Exception: ActiveRecord::ConnectionNotDefined
- Inherits:
-
ConnectionNotEstablished
- Object
- StandardError
- ActiveRecordError
- AdapterError
- ConnectionNotEstablished
- ActiveRecord::ConnectionNotDefined
- Defined in:
- lib/active_record/errors.rb
Overview
Raised when a database connection pool is requested but has not been defined.
Instance Attribute Summary collapse
-
#connection_name ⇒ Object
readonly
Returns the value of attribute connection_name.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#shard ⇒ Object
readonly
Returns the value of attribute shard.
Attributes inherited from AdapterError
Instance Method Summary collapse
-
#initialize(message = nil, connection_name: nil, role: nil, shard: nil) ⇒ ConnectionNotDefined
constructor
A new instance of ConnectionNotDefined.
Methods inherited from ConnectionNotEstablished
Constructor Details
#initialize(message = nil, connection_name: nil, role: nil, shard: nil) ⇒ ConnectionNotDefined
Returns a new instance of ConnectionNotDefined.
90 91 92 93 94 95 |
# File 'lib/active_record/errors.rb', line 90 def initialize( = nil, connection_name: nil, role: nil, shard: nil) super() @connection_name = connection_name @role = role @shard = shard end |
Instance Attribute Details
#connection_name ⇒ Object (readonly)
Returns the value of attribute connection_name.
97 98 99 |
# File 'lib/active_record/errors.rb', line 97 def connection_name @connection_name end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
97 98 99 |
# File 'lib/active_record/errors.rb', line 97 def role @role end |
#shard ⇒ Object (readonly)
Returns the value of attribute shard.
97 98 99 |
# File 'lib/active_record/errors.rb', line 97 def shard @shard end |