-
Notifications
You must be signed in to change notification settings - Fork 14
How to generate a controller
macourtney edited this page Sep 13, 2010
·
5 revisions
Added for version: 0.4
Updated for version: 0.7
To create a controller called ‘message’ with no actions use:
lein conjure generate controller message
Generate will create a file called ‘message.clj’ in the controllers directory. Generate will also create a functional test for the controller.
To create a controller called ‘message’ with an action called ‘show’ use:
lein conjure generate controller message show
Generate will create the controller and functional test as above, and create the binding “show”, the view “show” and unit tests for both.
To create a controller called ‘message and actions ’show’, ‘create’, and ‘edit’ use:
lein conjure generate controller message show create edit
Generate will create the controller, all bindings, all views and all tests as expected.