Exception: RESTFramework::UnknownModelError
- Defined in:
- lib/rest_framework/errors.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.
18 19 20 21 |
# File 'lib/rest_framework/errors.rb', line 18 def initialize(controller_class) super() @controller_class = controller_class end |
Instance Method Details
#message ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/rest_framework/errors.rb', line 23 def return <<~MSG.split("\n").join(" ") The model class for `#{@controller_class}` could not be determined. Any controller that includes `RESTFramework::BaseModelControllerMixin` (directly or indirectly) must either set the `model` attribute on the controller, or the model must be deducible from the controller name (e.g., `UsersController` could resolve to the `User` model). MSG end |