2016/11/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Refactor NullRelation#calculate
activerecord/lib/active_record/null_relation.rb
の修正です。
ActiveRecord::NullRelation#calculate
メソッドでif / elsif
で分岐処理を定義していたのを、case / when
を使用するようリファクタリングしています。
activesupport/lib/active_support/testing/isolation.rb
の修正です。
ActiveSupport::Testing::Isolation
でテスト実行用の引数を組み立てる際に、テスト名をShellwords.escape
でescapeするよう修正しています。
- test_opts = "-n#{self.class.name}##{self.name}" + test_opts = "-n#{self.class.name}##{Shellwords.escape(self.name)}"
テスト名にシングルクォートが含まれている事があり、そのまま使用してしまうとunexpected EOF while looking for matching
''`でエラーになってしまう為。
Support AC::Parameters for PG HStore
activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb
の修正です。
Postgres HStoreを使用しているattributeにActionController::Parameters
のインスタンスを渡してデータを保存しようとした場合に、TypeError
が発生してしまうバグがあったのを修正しています。
docs, add update_all
example with SQL fragment. [ci skip]
activerecord/lib/active_record/relation.rb
の修正です。
ActiveRecord::Relation#update_all
のdocに、update_all
にSQL fragmentを使用した場合のexampleを追加しています。
# Update all invoices and set the number column to its id value.
Invoice.update_all('number = id')