forked from tower-archive/tower
-
Notifications
You must be signed in to change notification settings - Fork 0
controller generator
Lance Pollard edited this page Apr 12, 2012
·
1 revision
To create a Controller for the User model, execute the Controller Generator like this:
tower generate controller Post
The controller should generate a single controller file:
|-- app
| |-- controllers
| | | `-- postsController.coffee
The controller will initially be empty:
class App.PostsController extends Tower.Controller
Fill it out as needed:
class App.PostsController extends Tower.Controller
@respondTo "html", "json"
new: ->
@posts = Post.all()