Exception: ViewModel::DeserializationError::DuplicateOwner
- Inherits:
-
InvalidRequest
- Object
- StandardError
- AbstractError
- AbstractErrorWithBlame
- ViewModel::DeserializationError
- InvalidRequest
- ViewModel::DeserializationError::DuplicateOwner
- Defined in:
- lib/view_model/deserialization_error.rb
Instance Attribute Summary collapse
-
#association_name ⇒ Object
readonly
Returns the value of attribute association_name.
Attributes inherited from AbstractErrorWithBlame
Instance Method Summary collapse
- #detail ⇒ Object
-
#initialize(association_name, parents) ⇒ DuplicateOwner
constructor
A new instance of DuplicateOwner.
Methods inherited from ViewModel::DeserializationError
Methods inherited from AbstractErrorWithBlame
Methods inherited from AbstractError
#aggregation?, #causes, #code, #exception, #meta, #status, #title, #to_s, #view
Constructor Details
#initialize(association_name, parents) ⇒ DuplicateOwner
Returns a new instance of DuplicateOwner.
234 235 236 237 |
# File 'lib/view_model/deserialization_error.rb', line 234 def initialize(association_name, parents) @association_name = association_name super(parents) end |
Instance Attribute Details
#association_name ⇒ Object (readonly)
Returns the value of attribute association_name.
232 233 234 |
# File 'lib/view_model/deserialization_error.rb', line 232 def association_name @association_name end |
Instance Method Details
#detail ⇒ Object
239 240 241 |
# File 'lib/view_model/deserialization_error.rb', line 239 def detail "Multiple parents attempted to claim the same owned '#{association_name}' reference: " + nodes.map(&:to_s).join(', ') end |