diff options
author | Arthur Neves <arthurnn@gmail.com> | 2015-01-09 15:35:27 -0500 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2015-01-09 15:35:51 -0500 |
commit | c7f56d99e51a62326c3639ca5b95e5416cb1f1d5 (patch) | |
tree | 9094743acd408deef73f50693f81b914212ae0a8 /activerecord/lib/active_record/connection_adapters | |
parent | ec475547a94315ac207ac4e9bd8f2ac04576230c (diff) | |
download | rails-c7f56d99e51a62326c3639ca5b95e5416cb1f1d5.tar.gz rails-c7f56d99e51a62326c3639ca5b95e5416cb1f1d5.tar.bz2 rails-c7f56d99e51a62326c3639ca5b95e5416cb1f1d5.zip |
Use keyword args on committed! and rolledback!
As discussed before, those methods should receive a keyword args instead of just parameters
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/transaction.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb index f6ef3b0675..335eb876cf 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb @@ -69,11 +69,11 @@ module ActiveRecord def rollback_records ite = records.uniq while record = ite.shift - record.rolledback! full_rollback? + record.rolledback!(force_restore_state: full_rollback?) end ensure ite.each do |i| - i.rolledback!(full_rollback?, false) + i.rolledback!(force_restore_state: full_rollback?, should_run_callbacks: false) end end @@ -88,7 +88,7 @@ module ActiveRecord end ensure ite.each do |i| - i.committed!(false) + i.committed!(should_run_callbacks: false) end end |