instance method
with_connection
Ruby on Rails 2.2.3
Since v2.2.3Signature
with_connection()
Reserve a connection, and yield it to a block. Ensure the connection is checked back in when finished.
Source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 112
def with_connection
conn = checkout
yield conn
ensure
checkin conn
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 112
· View on GitHub
· Improve this page
· Find usages on GitHub