2014/09/14分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
use allow_blank
option instead
activemodel/lib/active_model/secure_password.rb
の修正です。
password
の空チェックにif: ->{ password.present? }
を使用していたのを、allow_blank: true
に修正しています。
Revert "Merge pull request #15312 from JuanitoFatas/action_view/asset_path"
こちらのコミットをrevertしています。
asset_path
メソッドで引数のsourceをStringへ変換する前に空チェックを行うよう修正していたのですが、これによりPaperClipが動作しないバグが起きてしまった為、revertしています。
詳細はissue参照。
Merge pull request #13656 from chanks/rollback_transactions_in_killed_threads
activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
の修正です。
Transaction処理を行っているスレッドが、途中で死んた場合に、処理をrollbackするよう対応した、との事です。
ちょっと長いですが、テストコードから抜粋。
queue = Queue.new thread = Thread.new do Topic.transaction do @first.approved = true @second.approved = false @first.save queue.push nil sleep @second.save end end queue.pop thread.kill thread.join assert @first.approved?, "First should still be changed in the objects" assert !@second.approved?, "Second should still be changed in the objects" assert !Topic.find(1).approved?, "First shouldn't have been approved" assert Topic.find(2).approved?, "Second should still be approved"
なお、この対応はRuby 2.0+以上でのみ有効で、Ruby 1.9系はまだ未対応との事です。難しい…。
Time#change can now change nanoseconds (:nsec)
activesupport/lib/active_support/core_ext/time/calculations.rb
の修正です。
Time#change
メソッドでnanosecondsについても変更出来るよう対応しています。
Time.local(2005,1,2,11,22,33,2).change(nsec: 8000)
Rescue Rack::Utils::ParameterTypeError instead of TypeError
actionpack/lib/action_dispatch/http/request.rb
の修正です。
session_options=
メソッドでTypeError
をrescueしていたのを、Rack::Utils::ParameterTypeError
をrescueするよう修正しています。
rack側がRack::Utils::ParameterTypeError
をthrowするようになっていたので、それに合わせた形のようです。