2019/08/08分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activestorage/CHANGELOG.md
Fixed cache_store name used in adding other modules section of api app documentation. [ci skip]
rails guideのUsing Rails for API-only Applications
の修正です。
mem_cache_store
をmem_cached_store
にタイポしていたのを修正しています。
activerecord/test/cases/calculations_test.rb
の修正です。
quoted
をqouted
にタイポしていたのを修正しています。
Fix test schema loading for multi-db
activerecord/lib/active_record/migration.rb
の修正です。
pending migrationがあるかどうかをチェックの複数DBで正しく動作しないバグがあったのを修正しています。
Add CHANGELOG entry for ActiveJob change
activejob/CHANGELOG.md
、activejob/lib/active_job/test_helper.rb
の修正です。
perform_enqueued_jobs
メソッドにat
オプションを指定出来るようにした、Add at option to perform_enqueued_jobs test helperについてCHANGELOGにエントリーを追加、及び、assert_enqueued_jobs
から使用していないat
オプションを削除しています。
Correct the assertion argument order
actionmailbox/test/unit/test_helper_test.rb
の修正です。
assert_equal
メソッドの引数が逆(actual、expectedの順になっていた)になっていたのを修正しています。
Pass optional record in blob finder methods
activestorage/app/models/active_storage/blob.rb
、
activestorage/lib/active_storage/attached/changes/create_one.rb
の修正です。
blob findersにrecordを渡せるよう修正しています。
シャーディングを使用出来るようにする為(シャードするモデルを指定出来るようにする為)、との事です。
使用例。
ActiveSupport.on_load(:active_storage_blob) do include ShardedBlob end module ShardedBlob extend ActiveSupport::Concern included do def self.find_signed(id, record:) find_by!(id: ActiveStorage.verifier.verify(id, purpose: :blob_id), shard_id: record.shard_id) end # ... end end
Ensure custom PK types are casted in through reflection queries
activerecord/lib/active_record/reflection.rb
の修正です。
primary keyをカスタマイズ(uuid、string等を使用)している、かつ、has_many through assertionを使用してthroughするassociationを明示していない場合に、NotImplementedError
をraiseするよう修正しています。先のような状態だとassocation先が正しく取得出来ない(throughするassocationを明示する必要がある)為。
rails guideのDebugging Rails Applications
の修正です。
Debugging Memory Leaks
の項にDerailedへのリンクを追加しています。
Merge pull request #36848 from jhawthorn/type_error_on_resolve_connection
activerecord/lib/active_record/connection_adapters/connection_specification.rb
の修正です。
resolve_connection
に不正な値を指定した場合に無限ループになってしまっていたのを、正しくexceptionをraiseするよう修正しています。
Remove feature policy initializer in API only apps
railties/lib/rails/generators/rails/app/app_generator.rb
の修正です。
Feature Policy 用のinitializerをAPI-only Applicationでは削除するよう修正しています。APIモードではFeature Policyの機能はデフォルトでは動作しない為。