なるようになるブログ

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

rails commit log流し読み(2021/01/06)

2021/01/06分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activemodel/CHANGELOG.md


Keep Preloader#preload API the same as before

activerecord/lib/active_record/associations/preloader.rbの修正です。

Preloader#preloadメッセージのpreload_scope引数をoptionalに変更しています。Rails 6.0までと引数を合わせる為。


Fix grammar

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

autoload_paths and eager_load_pathsの項のグラマーを修正しています。


[ci skip]Inherit from correct base class in docs

activerecord/lib/active_record/attributes.rbのdocの修正です。

attribute APIのdoc内のexampleコードで、使用するクラスの指定に誤りがあったのを修正しています。


Add validate numericality in range

activemodel/lib/active_model/validations/numericality.rbの修正です。

numericality validatorでRangeを指定出来るよう修正しています。

validates_numericality_of :approved, in: 1..3

Revert "actionpack: Improve performance by allowing routes with custom regexes in the FSM."

routingのFSMで、custom regexepを指定してのroutingを行えるよう修正した、actionpack: Improve performance by allowing routes with custom regexes in the FSM.をRevertしています。

constaintsにSymbolを使用した場合に動作しなくなる、というリグレッションが発生してしまった為。

リグレッションを解決し、後ほど再度コミットされています。


actionpack: Improve performance by allowing routes with custom regexes in the FSM.

Action Packの修正です。

routingのFSMで、custom regexepを指定してのroutingを行えるよう修正した対応を再度コミットしています。


Add underscore in front of internal method

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

internal method(find_record)のメソッド名の先頭に_`を追加しています。ユーザが同名のメソッドを定義していた場合に、コンフリクトを避ける為。


Handle STI models for has_many dependent: :destroy_async

activerecord/lib/active_record/associations/has_many_association.rbの修正です。

STI modelsでhas_manyに:destroy_asyncを指定していた場合に、親レコード削除時に子のレコードが全て削除がされないバグがあったのを修正しています。


Remove leading whitespace from the XML under test

activesupport/test/xml_mini/xml_mini_engine_test.rbの修正です。

XMLのテストで、テスト対象のXMLから先頭の空白を削除するよう修正しています。

XMLのdoctypeの前に空白があるせいで、本来テストしたい内容とは違う問題でエラーになってしまう為。


Update minitest to comply with Ruby trunk

Gemfile.lockの修正です。

minitestのバージョンを最新のバージョンに更新しています。


Fix through association with through scope which has joins

activerecord/lib/active_record/associations/association_scope.rbactiverecord/lib/active_record/associations/join_dependency/join_association.rbの修正です。

through association + through scopeでjoinが使わている場合に、scopeの組み立てが正しく行われないバグがあったのを修正しています。