- 01 9月, 2020 8 次提交
-
-
由 Jean Boussier 提交于
-
由 Ryuta Kamizono 提交于
Should not accidentally return decorated time object after `changes_applied`
-
由 Ryuta Kamizono 提交于
Translate Mysql2 errors in Mysql2Adapter#quote_string
-
由 Jean Boussier 提交于
-
由 Ryuta Kamizono 提交于
Don't call `arel_table[attr]` directly makes handling predicate building easier in 3rd party code.
-
由 Ryuta Kamizono 提交于
Originally, time object is decorated after `changes_applied` by `forgetting_assignment` (`value_for_database`). https://github.com/rails/rails/blob/d2cdf0be675b44771f950697fc0b19ef0ea453f9/activemodel/lib/active_model/attribute.rb#L67-L69 https://github.com/rails/rails/blob/d2cdf0be675b44771f950697fc0b19ef0ea453f9/activemodel/lib/active_model/attribute.rb#L55-L57 Before #36352, fortunately `apply_seconds_precision` will return undecorated new time object by everytime `value.change` is called. Now, we need to explicitly check a time value is decorated or not in `cast_value`. Fixes #36910.
-
由 Xavier Noria 提交于
-
由 Samuel Cochran 提交于
This is misleading because belongs_to now already validates presence by default.
-
- 31 8月, 2020 6 次提交
-
-
由 George Claghorn 提交于
Prevent XSS where unsafe content is served inline on the application origin. Follows up on #34477. References 06ab7b27 and d40284b1.
-
由 sandstrom 提交于
-
由 Jonathan Hefner 提交于
Some video formats, such as WebM, do not store duration information at the level of the video stream. Instead, the duration is stored as part of the container format information. This commit modifies `VideoAnalyzer` to use the duration from the video container when the duration from the video stream is not available. Fixes #40130.
-
由 Ryuta Kamizono 提交于
Allow `where` references association names as joined table alias names
-
由 Eugene Kenny 提交于
Load Rails Rake tasks only once
-
由 Jonathan Hefner 提交于
In #39137, a new `Rake::Application` instance was created per Rake command invocation. To ensure that the Rails tasks were defined for each `Rake::Application`, `rails/tasks.rb` was loaded per instance. However, `Rake::Application#load_rakefile` loads the application's Rakefile, which should invoke `Rails.application.load_tasks`, which, in turn, also loads the Rails tasks. When a Rake task is defined more than once, all definition blocks are executed when the task is run. Hence, Rails task blocks were being executed twice. This commit removes the unnecessary load and avoids double execution. Fixes #40136.
-
- 30 8月, 2020 4 次提交
-
-
由 Xavier Noria 提交于
Enable Zeitwerk by default on TruffleRuby
-
由 Benoit Daloze 提交于
-
由 Vipul A M 提交于
fix(guides): Add maintenance policy link in contributing guides [ci skip]
-
由 Vipul A M 提交于
Resurrect doc explaining Basic Auth behavior [skip ci]
-
- 27 8月, 2020 19 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael França 提交于
Add DidYouMean for InverseOfAssociationNotFoundError
-
由 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 3 次提交
-
-
由 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 提交于
-