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.
290 291 292 293 |
# File 'lib/view_model/deserialization_error.rb', line 290 def initialize(association, node) @association = association super([node]) end |
Instance Attribute Details
#association ⇒ Object (readonly)
Returns the value of attribute association.
288 289 290 |
# File 'lib/view_model/deserialization_error.rb', line 288 def association @association end |
Instance Method Details
#detail ⇒ Object
295 296 297 |
# File 'lib/view_model/deserialization_error.rb', line 295 def detail "Cannot edit read only association '#{association}'" end |
#meta ⇒ Object
299 300 301 |
# File 'lib/view_model/deserialization_error.rb', line 299 def super.merge(association: association) end |