2020/06/20分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Generate nicer scope names from enums
activerecord/lib/active_record/enum.rb
の修正です。
enumのscopeを作成する際に、enumの値をparameterize
+ underscore
した値でscopeを作成するよう修正しています。
enumにスペースやハイフンを含んだ値を使用した場合に、通常使用出来るメソッド名になるようにする為。
Fix display of outputs on AV Helpers guide in case of multi-line [ci skip] (#39675)
rails guideのAction View Helpers
の修正です。
サンプルコードの出力結果の箇所に改行を入れるよう修正しています。
Rename structurally_incompatible_values_for_or
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
structurally_incompatible_values_for_or
メソッドをstructurally_incompatible_values_for
にリネームしています。
or
だけでなく、and
にも使用されている為。
Merge pull request #39674 from kamipo/faster_usec_parsing
activemodel/lib/active_model/type/helpers/time_value.rb
の修正です。
usecのパース処理で不要なRationalオブジェクトの生成を行わないようリファクタリングしています。
Merge pull request #39668 from kamipo/is_distinct_from_is_not_equality
activerecord/lib/arel/nodes/binary.rb
、
activerecord/lib/arel/nodes/equality.rb
の修正です。
Equality
クラス配下にあったIsDistinctFrom
、IsNotDistinctFrom
クラスを`Binary
クラス配下に移動しています。
equality nodeとしての機能を提供しているクラスでは無いため。
Allow ISO 8601 formatted string for fast_string_to_time
activemodel/lib/active_model/type/helpers/time_value.rb
の修正です。
fast_string_to_time
メソッドでISO 8601フォーマットの文字列もパース出来るよう修正しています。
これにより、ISO 8601フォーマットの文字列が指定された場合もfast_string_to_time
メソッドだけで処理が行われる(元はDate._parse
が使用されていた)ようになり、以前より処理が高速に行われるようになっています。
Documentation: Add touch_all to callbacks and validations guides [ci skip]
rails guideのActive Record Callbacks
、Active Record Validations
の修正です。
Callbacks、Validationsが実行されないメソッドの一覧にtouch_all
を追加しています。
Add regression tests for 859fba7c4bf7d33b4f9655914ed4bdc85380552e
activerecord/test/cases/relation/delete_all_test.rb
、
activerecord/test/cases/relation/update_all_test.rb
の修正です。
MySQL adapterでDELETE / UPDATE実行時にLIMIT + ORDER BYが使われる事を確認するテストを追加しています。
Merge pull request #39657 from tgxworld/update_follow_redirect_helper
actionpack/lib/action_dispatch/testing/integration.rb
の修正です。
follow_redirect!
メソッドで、HTTP statusが308の場合、元のHTTP verbをそのまま使用してredirectするよう修正しています。