Exception: Mongoid::Errors::ReadonlyAssociation
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::ReadonlyAssociation
- Defined in:
- lib/mongoid/errors/readonly_association.rb
Overview
Raised when attempting to write to a :through association, which is read-only.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(klass, association) ⇒ ReadonlyAssociation
constructor
Instantiate the exception.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, association) ⇒ ReadonlyAssociation
Instantiate the exception.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mongoid/errors/readonly_association.rb', line 15 def initialize(klass, association) super( ( 'readonly_association', { klass: klass, name: association.name, through: association.[:through] } ) ) end |