method

_default_wrap_model

Importance_1
v3.2.13 - Show latest stable - 0 notes - Class: ClassMethods
_default_wrap_model() protected

Determine the wrapper model from the controller’s name. By convention, this could be done by trying to find the defined model that has the same singularize name as the controller. For example, UsersController will try to find if the User model exists.

This method also does namespace lookup. Foo::Bar::UsersController will try to find Foo::Bar::User, Foo::User and finally User.

Show source
Register or log in to add new notes.