2024/01/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Add
<role>_typesclass method toActiveRecord::DelegatedTypeso that the delegated types can be instrospected - Fix Migrations with versions older than 7.1 validating options given to
add_reference.
Handle alternative base classes in define_attribute_methods
Active Recordの修正です。
applicationがeager load を使用していない、かつ、古いRails 6.1のMarshalファイルを使用している場合に、Active Recordのattribute用のgetter/setterメソッドが定義されないバグがあったのを修正した、Define missing attribute methods from method_missingの影響で、複数DBを使用しているアプリケーションでgetter/setterの定義処理で無限ループが発生してしまうバグがあったのを修正しています。
Merge pull request #50662 from nubinary/feature/delegated-type-types-introspection
activerecord/lib/active_record/delegated_type.rbの修正です。
ActiveRecord::DelegatedTypeにdelegated typeを使用しているクラスの一覧を取得するための<role>_types class methodを追加しています。
Merge pull request #46383 from dmytro-savochkin/fix-activerecord-reload-association-cache
activerecord/lib/active_record/associations/association.rb、
activerecord/lib/active_record/persistence.rbの修正です。
has_one/has_many through associationを使用している + transactionでafter_commitでcallbackを使用した後に、reloadメソッドでassociationのownerの情報が失われてしまうバグがあったのを修正しています。
Fix add_reference options validated on < 7.1
activerecord/lib/active_record/migration/compatibility.rbの修正です。
Rails 7.0以下のmigrationファイルで、add_referenceメソッドに指定するオプションが正しいかのチェックが誤って行われてしまうバグがあったのを修正しています。
Make sure after_routes_loaded hook runs on boot
railties/lib/rails/application/finisher.rbの修正です。
config/application.rbに指定したconfig.after_routes_loaded hookが実行されないバグがあったのを修正しています。
Merge pull request #46191 from yahonda/enable_layout_def_end_alignment
.rubocop.ymlの修正です。
Layout/DefEndAlignment copを有効化しています。
Merge pull request #50466 from skipkayhil/hm-fix-to-symbol-raising-nomethoderror
actionpack/lib/action_dispatch/routing/mapper.rbの修正です。
routingメソッドのtoオプションに不正な値が指定された場合に、ArgumentErrorをraiseするよう修正しています。
Handle nil backtrace_locations in SyntaxErrorProxy
activesupport/lib/active_support/syntax_error_proxy.rbの修正です。
SyntaxErrorProxy#backtrace_locationsで、SyntaxErrors#backtrace_locationsの戻り値がnilの場合の処理を追加しています。backtrace_locationsがnilになるケースがある為。
Merge pull request #50751 from skipkayhil/hm-av-silenceable-start
actionview/lib/action_view/log_subscriber.rbの修正です。
ActionView::LogSubscriberにsilenced?メソッドを追加しています。subscriberで出力するlogが出力不要の場合に、メソッドの呼び出し自体が抑止されるようにする為。
Modernize method missing implementations
method_missingの引数の指定に...を使用するよう修正しています。キーワード引数が分離されている場合、*argsや&blockを指定するよりシンプルかつ正確な為。