なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2020/05/09)

2020/05/09分のコミットです。

CHANGELOGへの追加はありませんでした。


Make NameError#missing_name work even for real Ruby NameError

activesupport/lib/active_support/core_ext/name_error.rbの修正です。

NameError#missing_nameメソッドを、Ruby本体のNameErrorが発生した場合も動作するよう修正しています。


reminder for helper Module in CHANGELOG for helper [ci skip]

actionpack/CHANGELOG.mdの修正です。

helperメソッドの挙動が変更になった対応( Remove require_dependency usage in helper [Closes #37632])についてのエントリーに、helperにmodule objectを渡せる事、及び、それを推奨する旨の説明を追加しています。


Add test case for generate_relation_method

activerecord/test/cases/scoping/named_scoping_test.rbactiverecord/test/models/topic.rbの修正です。

generate_relation_methodメソッドについてのテストを追加しています。


Remove duplicated attribute alias resolution

activerecord/lib/active_record/relation/predicate_builder.rbactiverecord/lib/active_record/table_metadata.rbの修正です。

重複していたattributeのalias解決処理を削除しています。


Support kwargs for named scopes

activerecord/lib/active_record/scoping/named.rbの修正です。

named scopesで引数にキーワード引数を使用した場合に、キーワード引数に関するwarningが出ないよう対応しています。


Association callbacks work with abort instead of exceptions [ci skip]

rails guideのActive Record Associationsの修正です。

Association Callbacksの項で、before_addでExceptionをthrowするとassociationのadd/removeを中断される旨説明が行われていたのですが、実際はabortをthrowする必要がある旨、その旨説明を修正しています。