2020/01/28分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activemodel/CHANGELOG.md
Merge pull request #38305 from jhawthorn/parallelize_activesupport
Active Supportの修正です。
ActiveSupport::Testing::Parallelization
を使用して、Active Supportのテストをparallelに実行するよう修正しています。
Merge pull request #37948 from kevinjalbert/benchmark-generator
railtiesの修正です。
benchmark用のスクリプトを生成するためのbenchmark generatorを追加しています。benchmarkには、benchmark-ips
が使われるようになっています。
Merge pull request #37969 from vinistock/make_small_performance_refactors_to_callbacks
activesupport/lib/active_support/callbacks.rb
の修正です。
around callbacksが定義されている際のProc
オブジェクトの生成数を削減するようリファクタリングしていまs.
Merge pull request #38320 from kamipo/avoid_making_query
activerecord/lib/active_record/relation/where_clause.rb
の修正です。
where
にattrの範囲外の値が指定された場合に、queryが実行されないよう修正しています。Rails 6.0より前の挙動と合わせる為。
Merge pull request #38319 from kamipo/make_default_scoped_public
activerecord/lib/active_record/scoping/named.rb
の修正です。
default scopesが設定されたscopeを返すdefault_scoped
メソッドをpublic APIにしています。
receiver scopeがclass level querying methodsに影響を与えている状態でメソッドを実行した場合の挙動の変更により、scoping
の中でdefault scopeを取得するにはdefault_scoped
メソッドを使用する必要があり、ユーザが通常使用するAPIになった為。
Revise Getting Started Guide -- up to first route
rails guideのGetting Started with Rails
の修正です。
Say "Hello", Rails
の項でroutesに関する詳細な説明を行うよう修正しています。
Getting Started guide全体の説明の改善を行っており、その一環との事です。
Allow checking whether an attribute previously changed from/to a particular value
activemodel/lib/active_model/dirty.rb
の修正です。
*_changed?
と同様に、*_previously_changed?
に、変更前/後の値を指定するためのfrom
及びto
オプションを指定出来るよう対応しています。
topic.update!(status: :archived) topic.status_previously_changed?(from: "active", to: "archived") # => true