v4.1.8 - Show latest stable - 0 notes - Class: Options
_default_wrap_model() private

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.