Is there an open connection
that is being used for the current thread?
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 107
def active_connection?
synchronize do
@reserved_connections.fetch(current_connection_id) {
return false
}.in_use?
end
end