Skip to content

Commit

Permalink
looks like we don't need to do this after all
Browse files Browse the repository at this point in the history
may need to revisit this if there are edge cases we aren't considering...
see DatabaseCleaner/database_cleaner#99
  • Loading branch information
jenseng committed Jun 28, 2014
1 parent 79f0bad commit a174cf4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/onceler/transactions/active_record_3.rb
@@ -1,9 +1,6 @@
module Onceler
module Transactions
def begin_transaction(conn)
unless conn.instance_variable_get(:@_current_transaction_records)
conn.instance_variable_set(:@_current_transaction_records, [])
end
if conn.open_transactions == 0
conn.transaction_joinable = false
conn.begin_db_transaction
Expand All @@ -17,10 +14,8 @@ def rollback_transaction(conn)
conn.decrement_open_transactions
if conn.open_transactions == 0
conn.rollback_db_transaction
conn.send :rollback_transaction_records, true
else
conn.rollback_to_savepoint
conn.send :rollback_transaction_records, false
end
end
end
Expand Down

0 comments on commit a174cf4

Please sign in to comment.