Exception: RESTFramework::Errors::UnknownModelError
- Inherits:
-
BaseError
- Object
- StandardError
- BaseError
- RESTFramework::Errors::UnknownModelError
- Defined in:
- lib/rest_framework/errors/unknown_model_error.rb
Instance Method Summary collapse
-
#initialize(controller_class) ⇒ UnknownModelError
constructor
A new instance of UnknownModelError.
- #message ⇒ Object
Constructor Details
#initialize(controller_class) ⇒ UnknownModelError
Returns a new instance of UnknownModelError.
2 3 4 5 |
# File 'lib/rest_framework/errors/unknown_model_error.rb', line 2 def initialize(controller_class) super() @controller_class = controller_class end |
Instance Method Details
#message ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rest_framework/errors/unknown_model_error.rb', line 7 def " The model class for `\#{@controller_class}` could not be determined. Any controller that\n includes `RESTFramework::BaseModelControllerMixin` (directly or indirectly) must either set\n the `model` attribute on the controller, or the model must be deducible from the controller\n name (e.g., `UsersController` could resolve to the `User` model).\n MSG\nend\n".split("\n").join(" ") |