namespace()
method in our mapper()
call.Users
controller which provides standard CRUD operations.Users.cfc
controller in controllers/admin/
.extend="Controller"
, but with a nested controller, we need to change this, as the main Controller.cfc
isn't at the same folder level.app
; This mapping will always correspond to your site root, so in our Users.cfc
we now have two options - extend the core Controller.cfc
via the app mapping, or perhaps extend another component (possibly Admin.cfc
) which extends the core Controller instead.app
mapping to "go to" the site root, and then look for a folder called controllers
, and within that, our main Controller.cfc
.super.config()
call will then run the config()
function in our base Controller.app.controllers.Controller
mapping to Admin.cfc
, and the extends="Admin"
in the Users.cfc
.table()
call. As Wheels will look for the tablename dependent on the model file location, it'll get confused if in a sub-directory.model()
calls more complex, as you need to specify the model name in dot notation: