2024/01/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Add
<role>_types
class method toActiveRecord::DelegatedType
so 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
を指定するよりシンプルかつ正確な為。