2020/12/10分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Better handling of negative words in enum
activerecord/lib/active_record/enum.rb
の修正です。
not_
で始まるメソッドが存在していた場合、enum定義時にwarningが出力されいたのを、not_
で始まらない同名のメソッドがある場合のみwarningを出力するよう修正しています。
Merge pull request #40765 from kamipo/allow_nil_should_work_for_casted_value
activemodel/lib/active_model/validations/numericality.rb
、
activemodel/lib/active_model/validator.rb
の修正です。
NumericalityValidator
にcasted valueを指定した場合に、allow_nil
オプションが動作しないバグがあったのを修正しています。
Rename the method to match what it is doing
activemodel/lib/active_model/validations/numericality.rb
、
activemodel/lib/active_model/validator.rb
の修正です。
read_attribute_for_validation
メソッドをprepare_value_for_validation
にリネームしています。現在の挙動としてはprepare
の方が適切な為。
Convert translation key to string as necessary
actionview/lib/action_view/helpers/translation_helper.rb
の修正です。
translate
のkeyにString、Symbol以外の値(e.g. Integer)の値を指定した場合にエラーになってしまうバグがあったのを修正しています。
Inflection support default_locale and fallbacks
activesupport/lib/active_support/i18n.rb
、
activesupport/lib/active_support/inflector/inflections.rb
の修正です。
Inflectionで値を参照する際に、I18n
で定義されているdefault_locale
及びfallbacks
の値を使用するよう修正しています。
Fix :en-GB pluralization test (day -> days)
activesupport/test/inflector_test.rb
の修正でうs.
pluralization + fallbackのテストで、テストに指定する値を誤っていたのを修正しています。
Merge pull request #40168 from igor04/disable_with_and_automatically_disable_submit_tag
actionview/lib/action_view/helpers/form_tag_helper.rb
の修正です。
ActionView::Base.automatically_disable_submit_tag
にfalse
が指定されている場合に、submit_tag
に指定したdisable_with
オプションの値が無視されてしまうバグがあったのを修正しています。
Fix strict loading on validations
activerecord/lib/active_record/associations/association.rb
の修正です。
validationsによるrecordのロード処理は、strict loadingのチェック対象にしないよう修正しています。
Refactoring the code to avoid some conditionals
actionview/lib/action_view/helpers/form_tag_helper.rb
の修正です。
set_default_disable_with
メソッドについて、分岐処理を減らすようリファクタリングしています。