Fix using_connection

This commit is contained in:
Ary Borenszweig 2016-07-11 12:56:40 -03:00
parent a2c22c16cf
commit fff67e86a0
1 changed files with 5 additions and 3 deletions

View File

@ -63,9 +63,11 @@ module DB
# when the block ends # when the block ends
def using_connection def using_connection
connection = get_from_pool connection = get_from_pool
yield connection begin
ensure yield connection
return_to_pool connection ensure
return_to_pool connection
end
end end
include QueryMethods include QueryMethods