instance method
establish_connection
Ruby on Rails 4.0.13
Since v2.2.3Signature
establish_connection(owner, spec)
No documentation comment.
Parameters
-
ownerreq -
specreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 512
def establish_connection(owner, spec)
@class_to_pool.clear
raise RuntimeError, "Anonymous class is not allowed." unless owner.name
owner_to_pool[owner.name] = ConnectionAdapters::ConnectionPool.new(spec)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 512
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::ConnectionHandler