Exception: Graphiti::Errors::ResourceNotFound

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

Instance Method Summary collapse

Constructor Details

#initialize(resource_class, sideload_name, tried) ⇒ ResourceNotFound



648
649
650
651
652
# File 'lib/graphiti/errors.rb', line 648

def initialize(resource_class, sideload_name, tried)
  @resource_class = resource_class
  @sideload_name = sideload_name
  @tried = tried
end

Instance Method Details

#messageObject



654
655
656
657
658
659
660
661
662
663
664
# File 'lib/graphiti/errors.rb', line 654

def message
  "    Could not find resource class for sideload '\#{@sideload_name}' on Resource '\#{@resource_class.name}'!\n\n    Tried to find classes: \#{@tried.join(\", \")}\n\n    If this follows a non-standard naming convention, use the :resource option to pass it directly:\n\n    has_many :comments, resource: SpecialCommentResource\n  MSG\nend\n"