Exception: ViewModel::DeserializationError::ReadOnlyAssociation
- Inherits:
-
ViewModel::DeserializationError
- Object
- StandardError
- AbstractError
- AbstractErrorWithBlame
- ViewModel::DeserializationError
- ViewModel::DeserializationError::ReadOnlyAssociation
- Defined in:
- lib/view_model/deserialization_error.rb
Instance Attribute Summary collapse
-
#association ⇒ Object
readonly
Returns the value of attribute association.
Attributes inherited from AbstractErrorWithBlame
Instance Method Summary collapse
- #detail ⇒ Object
-
#initialize(association, node) ⇒ ReadOnlyAssociation
constructor
A new instance of ReadOnlyAssociation.
- #meta ⇒ Object
Methods inherited from ViewModel::DeserializationError
Methods inherited from AbstractError
#aggregation?, #causes, #code, #exception, #status, #title, #to_s, #view
Constructor Details
#initialize(association, node) ⇒ ReadOnlyAssociation
Returns a new instance of ReadOnlyAssociation.
273 274 275 276 |
# File 'lib/view_model/deserialization_error.rb', line 273 def initialize(association, node) @association = association super([node]) end |
Instance Attribute Details
#association ⇒ Object (readonly)
Returns the value of attribute association.
271 272 273 |
# File 'lib/view_model/deserialization_error.rb', line 271 def association @association end |
Instance Method Details
#detail ⇒ Object
278 279 280 |
# File 'lib/view_model/deserialization_error.rb', line 278 def detail "Cannot edit read only association '#{association}'" end |
#meta ⇒ Object
282 283 284 |
# File 'lib/view_model/deserialization_error.rb', line 282 def super.merge(association: association) end |