Exception: Graphiti::Errors::ModelNotFound

Inherits:
Base
  • Object
show all
Defined in:
lib/graphiti/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource_class) ⇒ ModelNotFound

Returns a new instance of ModelNotFound.



538
539
540
# File 'lib/graphiti/errors.rb', line 538

def initialize(resource_class)
  @resource_class = resource_class
end

Instance Method Details

#messageObject



542
543
544
545
546
547
548
# File 'lib/graphiti/errors.rb', line 542

def message
  <<~MSG
    Could not find model for Resource '#{@resource_class}'

    Manually set model (self.model = MyModel) if it does not match name of the Resource.
  MSG
end