Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #17 from braintreeps/nested_transactions

Remove code that changes the behavior of nested transactions
  • Loading branch information...
commit ae8f3406563e1aa861df0f3498ca4e7e875f57d4 2 parents eb9cf5a + 6b624bf
@mperham mperham authored
Showing with 1 addition and 10 deletions.
  1. +1 −10 lib/data_fabric/connection_proxy.rb
View
11 lib/data_fabric/connection_proxy.rb
@@ -79,13 +79,8 @@ def initialize(model_class, options)
delegate :insert_many, :to => :master # ar-extensions bulk insert support
def transaction(start_db_transaction = true, &block)
- # Transaction is not re-entrant in SQLite 3 so we
- # need to track if we've already started an XA to avoid
- # calling it twice.
- return yield if in_transaction?
-
with_master do
- connection.transaction(start_db_transaction, &block)
+ connection.transaction(start_db_transaction, &block)
end
end
@@ -130,10 +125,6 @@ def current_pool
private
- def in_transaction?
- current_role == 'master'
- end
-
def spec_for(config)
# XXX This looks pretty fragile. Will break if AR changes how it initializes connections and adapters.
config = config.symbolize_keys
Please sign in to comment.
Something went wrong with that request. Please try again.