2021/01/12分のコミットです。
CHANGELOGへの追加はありませんでした。
Fix typo in Action Text Overview guide
rails guideのAction Text Overviewの修正です。
ActionをAcitonにタイポしていたのを修正しています。
Add round up assertions for decimal tests
activemodel/test/cases/type/decimal_test.rbの修正です。
decimalのテストで、round upした値についてもチェックするよう修正しています。
Use _read_attribute instead of []
activerecord/lib/active_record/associations/belongs_to_association.rb、
activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rbの修正です。
reflectionからforeign_keyを取得する際に[]メソッドの代わりに_read_attributeを使用するよう修正しています。
_read_attributeの方が速いのと、selectを使ってattributeが制限されている場合にエラーにならない為。
Restore the ability that update/destroy optimistic locking object without default
activemodel/lib/active_model/attribute.rb、
activerecord/lib/active_record/locking/optimistic.rbの修正です。
Revert "Fix update with dirty locking column to not match latest object accidentally"のRevert commitにより、default valueの指定が無いoptimistic lockingを使用しているobjectのupate / destroyが出来なくなっていたのを、再度出来るよう対応しています。
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rbの修正です。
arelがlocked?かどうかのチェックをインラインで行うよう修正しています。
Fix find_by with custom primary key for belongs_to association
activerecord/lib/active_record/core.rbの修正です。
belongs_to association + primary keyをcustomしている場合に、find_byにassociationを指定した場合にcustom primary keyによる検索が行われないバグがあったのを修正しています。