2021/08/18分のコミットです。
CHANGELOGへの追加はありませんでした。
Avoid orders_count
in Active Record order
guide examples
rails guideのActive Record Query Interface
の修正です。
order
メソッドのexampleでorders_count
を使用しないよう修正しています。orders_count
がorder
と関係あるのでは、と勘違いさせてしまう可能性があるため、とのことです。
Do not change the framework if all we want are configs
actionpack/lib/action_controller/railtie.rb
、
activejob/lib/active_job/railtie.rb
の修正です。
code内で使用していないattrをbase classに追加しないよう修正しています。
rails guideのConfiguring Rails Application
の修正です
query tags関連のconfigについての説明を追加しています。
Avoid using class_eval and just include a module
query tagの機能を追加するのにclass_eval
を使用していたのに、関連する機能をmoduleに切り出して単純にincludeするだけに修正しています。
Active Recordの修正です。
コードのスタイル(<<
を2回使っていた箇所をArrayを+
するよう修正など)の修正を行っています。
Remove more unneeded methods that should be configs
Active Recordの修正です。
configの設定をする時だけ必要な値に対する不要なメソッドを削除しています。
Move default tagging configuration to the railtie
activerecord/lib/active_record/query_logs.rb
、
activerecord/lib/active_record/railtie.rb
の修正です。
デフォルトのtaggingの設定をrailtiesで行うよう修正しています。他のconfigと同じ箇所でデフォルト値を設定するようにする為。
activerecord/lib/active_record/railtie.rb
の修正です。
アプリケーション名に関する不要なメモ化を削除しています。
activerecord/lib/active_record/query_logs.rb
の修正です。
tagにstaticな値を指定出来るよう修正しています。
Fix initialization proccess of the query tags
actionpack/lib/action_controller/railtie.rb
、
activejob/lib/active_job/railtie.rb
の修正です。
query tags関連の処理で、configに指定した値が正しく反映されてなかったのを修正しています。
Improve taggings API by introducing a null object
activerecord/lib/active_record/query_logs.rb
の修正です。
taggings contextが未設定かどうかを扱うのにnil
ではなく、専用のクラス(NullObject
)を使うよう修正しています。&.
をchainしないで済むようにする為。
Stop relying on mutating the configuration object
actionpack/lib/action_controller/railtie.rb
、
activejob/lib/active_job/railtie.rb
の修正です。
configuration objectの値を設定処理中に変更しないよう修正しています。
Only try to configure the query log tags if Active Record is present
actionpack/lib/action_controller/railtie.rb
、
activejob/lib/active_job/railtie.rb
の修正です。
Active Recordのconfigが定義済みの時のみ、config.active_record.query_log_tags_enabled
を参照するよう修正しています。
No need to check if the logs are enable to run those tests
activerecord/test/cases/query_logs_test.rb
の修正です。
不要なlog tagsが有効化されているかどうかのチェックを削除しています。
Fix action_on_unpermitted_parameters setter
actionpack/lib/action_controller/railtie.rb
の修正です。
action_on_unpermitted_parameters
にfalseが指定されていた場合に、その指定が無視されてしまっていたのを修正しています。
Delay the exclusion of the configs to the last minute
actionpack/lib/action_controller/railtie.rb
、
activejob/lib/active_job/railtie.rb
、
activerecord/lib/active_record/railtie.rb
の修正です。
まだ使用される可能性がある前にconfigの除外処理をしてしまっていたのを、除外処理を実際に必要になる直前で行うよう修正しています。
Tweaks wording in guide [skip ci]
rails guideのAutoloading and Reloading Constants
の修正です。
Autoloading and Engines
の項の言い回しを修正しています。