2018/09/11分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activerecord/CHANGELOG.md
の修正です。
inspect
をinsepct
にタイポしている箇所があったのを修正しています。
Remove all references to slave in the codebase
railtiesのテストの修正です。
テストでmaster / slaveという言葉を使用していたのを、primary / replicaを使用するよう修正しています。
master / slaveは差別的な意味合いがある言葉の為。
Add #unfreeze_time to ActiveSupport::Testing::TimeHelpers
activesupport/lib/active_support/testing/time_helpers.rb
の修正です。
travel_back
のaliasとしてunfreeze_time
メソッドを追加しています。
freeze_time
が既にあり、それと対称となるメソッドがあった方がわかりやすいだろう、ということで追加されています。
Merge pull request #33823 from stoodfarback/aj_backburner_fix_priority
activejob/lib/active_job/queue_adapters/backburner_adapter.rb
の修正です。
Backburner adapterで、jobに指定したpriorityがbackend(Backburner::Worker
)に渡されてなかったのを、渡すよう修正しています。
activesupport/lib/active_support/testing/time_helpers.rb
のdocの修正です。
travel_back
メソッドのdocで、カンマのフォーマットをoxford commaに修正しています。
railties/test/application/dbconsole_test.rb
、
railties/test/engine/commands_test.rb
の修正です。
Remove all references to slave in the codebaseの対応で修正が漏れている箇所があったのを修正しています。
activerecord/lib/active_record/relation.rb
の修正です。
create_with
メソッドにnested attributesを指定した場合に、重複したレコードが作成されてしまう(本来1レコードだけ作成される筈が2レコード作成されてしまう)バグがあったのを修正しています。
Remove unused existing
arg in SelectManager#collapse
activerecord/lib/arel/select_manager.rb
の修正です。
SelectManager#collapse
メソッドから使用していないexisting
引数を削除しています。
activerecord/lib/active_record/scoping/named.rb
の修正です。
Scoping::Named#scope
メソッドから不要なscoping
メソッドの呼び出しを削除しています。
Move scoping
handling into klass level from relation
activerecord/lib/active_record/relation.rb
の修正です。
scoping
メソッドの実装をRelation
クラスからclass methodに移動しています。
後ほどinternal scopingの問題の解決の為に使用したい為、とのことです。
Don't expose current_scope
for internal use
activerecord/lib/active_record/scoping.rb
、
activerecord/lib/active_record/scoping/named.rb
の修正です。
Scoping
moduleのcurrent_scope
、current_scope=
メソッドの可視性をprivateに変更しています。内部でだけで使用するメソッドの為。
Refactor object creation from relation to avoid pushing scope attributes
activerecord/lib/active_record/inheritance.rb
、
activerecord/lib/active_record/relation.rb
の修正です。
Relation
クラスの各オブジェクト生成処理でscope attributesの生成を行っていたのを、行わないよう修正しています。
元々はinheritance objectの生成処理に関するバグ修正の為にscope attributesの生成、及び、それらのattributeをklass.new
に渡すようになっていたのですが、そちらの処理はInheritance
moduleで行うようリファクタリングしています。
Don't expose instantiate_instance_of
for internal use
activerecord/lib/active_record/persistence.rb
の修正です。
Persistence
moduleのinstantiate_instance_of
メソッドの可視性をprivateに変更しています。内部でだけで使用するメソッドの為。