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による検索が行われないバグがあったのを修正しています。