Exception: RESTFramework::Errors::DelegatedMethodError
- Inherits:
-
BaseError
- Object
- StandardError
- BaseError
- RESTFramework::Errors::DelegatedMethodError
- Defined in:
- lib/rest_framework/errors.rb
Instance Method Summary collapse
-
#initialize(receiver, target) ⇒ DelegatedMethodError
constructor
A new instance of DelegatedMethodError.
- #message ⇒ Object
Constructor Details
#initialize(receiver, target) ⇒ DelegatedMethodError
Returns a new instance of DelegatedMethodError.
30 31 32 33 |
# File 'lib/rest_framework/errors.rb', line 30 def initialize(receiver, target) @receiver = receiver.is_a?(Class) ? receiver : receiver.class @target = target end |
Instance Method Details
#message ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/rest_framework/errors.rb', line 35 def <<~MSG.squish Delegated action `#{@target}` does not resolve to a public method on `#{@receiver}`. This is almost certainly a typo, a missing method, or a method that should be public. Define a public class method (for a collection action) or instance method (for a member action), or remove the action. MSG end |