- 27 8月, 2020 17 次提交
-
-
由 Rafael Mendonça França 提交于
Extend `ActionView::Helpers#translate` to yield
-
由 Rafael Mendonça França 提交于
All branches that use translated_text are covered so we can remove this method call. Also apply some whitespaces around conditionals to make them explicit.
-
由 Sean Doyle 提交于
This commit extends the `ActionView::Helpers#translate` (and by way of alias, `#t`) helper methods to accept blocks. When invoked with a block, the `translate` call will yield the translated text as its first block argument, along with the resolved translation key as its second: ```erb <%= translate(".key") do |translation, resolved_key| %> <span data-i18n-key="<%= resolved_key %>"><%= translation %></span> <% end %> ``` In cases where relative translation keys are foregone in lieu of fully qualified keys, or if the caller is not interested in the resolved key, the second block argument can be omitted: ```erb <%= translate("action.template.key") do |translation| %> <p><%= translation %></p> <p><%= translation %>, but a second time</p> <% end %> ``` A benefit of yielding the translation is that it enabled template-local variable re-use. Alternatively, [`Object#tap`][tap] could be used. Prior to this commit, however, the resolution of the translation key was internal to `ActionView`, and unavailable to the caller (unless they were willing to explicitly determine the resolved key themselves). By making it available as a block parameter, it could be used to annotate the translated value in the resulting elements. [tap]: https://ruby-doc.org/core-2.7.0/Object.html#method-i-tap
-
由 Rafael França 提交于
Use html for DidYouMean suggestions on error pages
-
由 Rafael França 提交于
Fix rounding of custom-formatted negative amounts
-
由 Rafael França 提交于
Soft deprecate Rails::Application secrets
-
由 Adrianna Chang 提交于
-
由 Rafael França 提交于
Fix ActiveRecord::PendingMigrationError action not dumping schema.
-
由 Rafael França 提交于
Add ActiveSupport::Duration conversion methods
-
由 Rafael França 提交于
Add verba-sequentur configuration [ci-skip]
-
由 Rafael Mendonça França 提交于
This will make clear what is the expected behavior of that method call.
-
由 Rafael França 提交于
Implement #inspect for ActiveSupport::OrderedOptions
-
由 Adrianna Chang 提交于
-
由 Rafael França 提交于
Wrap native adapters connection errors in ActiveRecord::ConnectionNotEstablished
-
由 Rafael França 提交于
Add config.active_record.check_schema_cache_dump_version to disable schema dump version check
-
由 Rafael França 提交于
Deprecate custom Action Mailer delivery job:
-
由 Akshay Birajdar 提交于
-
- 26 8月, 2020 19 次提交
-
-
由 Edouard CHIN 提交于
- Action Mailer delivery job should modify their `perform` method signature in order to receive the new payload that Action Mailer sends. Before: ```ruby def perform(mailer, mail_method, delivery_method, *args) end ``` After: ```ruby def perform(mailer, mail_method, delivery_method, args:) end ``` This new behaviour was introduced couple years ago in a attempt to get rid of the necessity to have a different job for paramterized mailers. A deprecation was introduced for custom jobs inheriting from `ActionMailer::DeliveryJob` but for jobs that didn't it went unnoticed. The deprecated behaviour was supposed to be removed in Rails 6.1 but we couldn't and it got reverted https://github.com/rails/rails/pull/39257
-
由 Jason York 提交于
-
由 Jason York 提交于
-
由 Jean Boussier 提交于
-
由 Jean Boussier 提交于
-
由 Guo Xiang Tan 提交于
-
由 Ryuta Kamizono 提交于
-
由 Daniel Colson 提交于
Add note to avoid requiring config/initializers [ci skip]
-
由 Daniel Colson 提交于
[ci skip] Closes #40021 I began this commit by adding an additional note about explicitly requiring initializers. `config/intializers` are loaded with `load` rather than `require` (and always have been, since they were introduced way back in c6d60825). So explicitly requiring them can be problematic if they are not idempotent. But @p8 pointed out that it is a bit awkward to have 3 notes and one tip larger than the actual text in this section. This commit now also reworks 2 of the notes and the tip into additional paragraphs in the main text. The benefits of the new version I see: - We now explicitly say that the initializers are loaded by sort order - We now start with the ideal way to deal with dependent initializers, then follow with a couple warnings. We used to lead with what not to do, which I think was a bit confusing. - The language around subdirectories is much simpler (mentioning that subdirectories can be used for organizing seemed unnecessary to me - that is true of subdirectories in general, and doesn't have any specific connection to initializers) This commit does not change the opening paragraph or the note about when to use `after_initialize` instead, although it does reformat them.
-
由 Rafael França 提交于
deep dup optimization
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael França 提交于
Changes over AR Querying guide making use of Bookstore example
-
由 Eugene Kenny 提交于
Rename horrible and dirty to puzzled and confused in test models
-
由 Rafael França 提交于
Allow procs for config.action_dispatch.cookies_same_site_protection
-
由 Jack McCracken 提交于
Add documentation of Proc usage for SameSite property to configuring.md Address PR comments Co-authored-by: NAdrianna Chang <adrianna.chang@shopify.com>
-
由 Rafael Mendonça França 提交于
MySQL <= 5.7 doesn't support so we should not try to check them.
-
由 Petrik 提交于
In 7f938cac the test model `Man` was renamed to `Human`. Maybe this is a good time to also change `horrible_human` and `dirty_human` to `happy_human` and `confused_human`. While this change is mostly cosmetic change, the phrase "dirty man" has a negative meaning. The adjectives "confused" and "puzzled" were chosen because they are used for defining associations with errors.
-
- 25 8月, 2020 2 次提交
-
-
由 Rafael França 提交于
don't add preload headers for deferred scripts and add nopush
-
由 Daniel Colson 提交于
Documents other_than option for numericality validation [skip ci]
-
- 24 8月, 2020 2 次提交
-
-
由 Abhay Nikam 提交于
-
由 Ryuta Kamizono 提交于
Since other part in `arel` is not necessary for that.
-