Exception: MassiveRecord::ORM::NotAssignedToEmbeddedCollection
- Inherits:
-
MassiveRecordError
- Object
- StandardError
- MassiveRecordError
- MassiveRecord::ORM::NotAssignedToEmbeddedCollection
- Defined in:
- lib/massive_record/orm/errors.rb
Overview
Raised when an ORM::Embedded is asked to save itself without being assigned a collection to be embedded in
Instance Attribute Summary collapse
-
#embedded_in_missing_values ⇒ Object
readonly
Returns the value of attribute embedded_in_missing_values.
Instance Method Summary collapse
-
#initialize(record, embedded_in_missing_values) ⇒ NotAssignedToEmbeddedCollection
constructor
A new instance of NotAssignedToEmbeddedCollection.
Constructor Details
#initialize(record, embedded_in_missing_values) ⇒ NotAssignedToEmbeddedCollection
Returns a new instance of NotAssignedToEmbeddedCollection.
81 82 83 84 |
# File 'lib/massive_record/orm/errors.rb', line 81 def initialize(record, ) @embedded_in_missing_values = super("#{record.inspect} needs to be embedded in collection before save. Embedded-in-attribute(s) missing assignment(s): #{.join(', ')}") end |
Instance Attribute Details
#embedded_in_missing_values ⇒ Object (readonly)
Returns the value of attribute embedded_in_missing_values.
80 81 82 |
# File 'lib/massive_record/orm/errors.rb', line 80 def @embedded_in_missing_values end |