cleanup on base mgr
This commit is contained in:
parent
062dfe481c
commit
fe9c1462a4
|
|
@ -13,7 +13,7 @@ module JamRuby
|
|||
end
|
||||
|
||||
# Creates a connection manager, and associates the connection created by active_record with ourselves
|
||||
def self.active_record_transaction(&block)
|
||||
def self.active_record_transaction
|
||||
|
||||
manager = self.new
|
||||
ActiveRecord::Base.connection_pool.with_connection do |connection|
|
||||
|
|
@ -23,7 +23,7 @@ module JamRuby
|
|||
manager.pg_conn = connection.instance_variable_get("@connection")
|
||||
|
||||
connection.transaction do
|
||||
block.call(manager)
|
||||
yield manager
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue