class ViewModel::DeserializationError::InvalidAssociationType

The target of an association was not a valid view type for that association.

Attributes

association[R]
target_type[R]

Public Class Methods

new(association, target_type, node) click to toggle source
Calls superclass method ViewModel::AbstractErrorWithBlame::new
# File lib/view_model/deserialization_error.rb, line 150
def initialize(association, target_type, node)
  @association = association
  @target_type = target_type
  super([node])
end

Public Instance Methods

detail() click to toggle source
# File lib/view_model/deserialization_error.rb, line 156
def detail
  "Invalid target viewmodel type '#{target_type}' for association '#{association}'"
end
meta() click to toggle source
Calls superclass method ViewModel::AbstractErrorWithBlame#meta
# File lib/view_model/deserialization_error.rb, line 160
def meta
  super.merge(association: association,
              target_type: target_type)
end