なるようになるブログ

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

rails commit log流し読み(2021/03/08)

2021/03/08分のコミットです。

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


Autoloading docs: Grammar/style tweaks

rails guideのAutoloading and Reloading Constants (Zeitwerk Mode)の修正です。

各箇所のグラマー、フォーマットの修正を行っています。


Allow select statement node's initializer takes a table

Active Recordの修正です。

statement nodeのinitializerでtableを指定出来るよう修正しています。他のstatement nodeと挙動を合わせる為。


Remove unused accessors left and right on DeleteStatement

activerecord/lib/arel/nodes/delete_statement.rbの修正です。

DeleteStatement classから、使用していないleftright accessorを削除しています。


Use records.compact! over records.compact in excluding

activerecord/lib/active_record/relation/query_methods.rbの修正です。

excludingメソッドでrecords.compactを使用していたのを、records.compact!を使用するよう修正しています。nilrecordsに残っていると不要なstatementが生成されてしまう為。


Add app/{helpers,models} to autoload_once_paths

actiontext/lib/action_text/engine.rbの修正です。

Action Textのapp/helpersとapp/modelsをautoload_once_pathsの対象に追加しています。helperと同様に、reloadの対象とならないようにする為。


Use stable branch for --edge option when possible

railties/lib/rails/generators/app_base.rbの修正です。

rails new--edgeオプションを指定した場合にブランチ名の指定がmain固定になっていたのを、Railsのgemのバージョン名から生成するよう修正しています。


Drops support for classic mode

Rails 6.1でdeprecateになったAutoload(Classic Mode)のコードを削除しています。


Deletes AS::Dependencies::Reference

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

先の対応により使用しなくなったActiveSupport::Dependencies::Referenceを削除しています。


Deletes AS::Dependencies::ClassCache

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

先の対応により使用しなくなったActiveSupport::Dependencies::ClassCacheを削除しています。


Merge pull request #41577 from kamipo/avoid_extra_bind_allocation

Active Recordの修正です。

placeholderを生成する際に、BindParamオブジェクトの生成を行わないようリファクタリングしています。


Merge pull request #41599 from kamipo/changelog_for_type_cast_enum_values

activerecord/CHANGELOG.mdactiverecord/test/cases/enum_test.rbの修正です。

Serialized value on the enum attribute should be type casted by the subtypeで行った、enum valuesをcastする際に元のattribute typeに変換する対応についてCHANGELOGにエントリーを追加しています。