Exception: Graphiti::Errors::ResourceNotFound
- Defined in:
- lib/graphiti/errors.rb
Instance Method Summary collapse
-
#initialize(resource_class, sideload_name, tried) ⇒ ResourceNotFound
constructor
A new instance of ResourceNotFound.
- #message ⇒ Object
Constructor Details
#initialize(resource_class, sideload_name, tried) ⇒ ResourceNotFound
Returns a new instance of ResourceNotFound.
708 709 710 711 712 |
# File 'lib/graphiti/errors.rb', line 708 def initialize(resource_class, sideload_name, tried) @resource_class = resource_class @sideload_name = sideload_name @tried = tried end |
Instance Method Details
#message ⇒ Object
714 715 716 717 718 719 720 721 722 723 724 |
# File 'lib/graphiti/errors.rb', line 714 def <<~MSG Could not find resource class for sideload '#{@sideload_name}' on Resource '#{@resource_class.name}'! Tried to find classes: #{@tried.join(", ")} If this follows a non-standard naming convention, use the :resource option to pass it directly: has_many :comments, resource: SpecialCommentResource MSG end |