cleanup on base mgr

This commit is contained in:
Mike Slemmer 2012-11-30 01:34:50 -08:00
parent 062dfe481c
commit fe9c1462a4
1 changed files with 2 additions and 2 deletions

View File

@ -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