diff options
author | Erol Fornoles <erol.fornoles@gmail.com> | 2017-02-18 15:58:43 +0800 |
---|---|---|
committer | Erol Fornoles <erol.fornoles@gmail.com> | 2017-02-21 14:03:55 +0800 |
commit | c478c74c183c480398eab822f4265e06a9501d36 (patch) | |
tree | 7b82f289feb9f39fb7264da689afed3fd5a0d47c /activerecord/lib | |
parent | c1d57d74acf7c3cb06cb3e641111d592a8a174a8 (diff) | |
download | rails-c478c74c183c480398eab822f4265e06a9501d36.tar.gz rails-c478c74c183c480398eab822f4265e06a9501d36.tar.bz2 rails-c478c74c183c480398eab822f4265e06a9501d36.zip |
Prioritize checking `:on` actions before `:if` for transaction callbacks
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/transactions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 08417aaa0f..690deee508 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -283,7 +283,7 @@ module ActiveRecord fire_on = Array(options[:on]) assert_valid_transaction_action(fire_on) options[:if] = Array(options[:if]) - options[:if] << "transaction_include_any_action?(#{fire_on})" + options[:if].unshift("transaction_include_any_action?(#{fire_on})") end end |