(Quick Reference)
generate-all
Purpose
Generates a controller, views, and a controller unit test for the given domain class
Examples
grails generate-all org.bookstore.Book
grails generate-all *
Description
Grails supports a feature known as scaffolding which involves the generation of a CRUD (Create/Read/Update/Delete) interface for a given domain class.
The generate-all command generates an implementation of CRUD including a controller and views for the given domain class. So for a domain class
org.bookstore.Book
a controller in
grails-app/controllers/org/bookstore/BookController.groovy
and views in
grails-app/views/book
will be generated.
Usage:
grails generate-all [name]
Fired Events:
StatusUpdate
- When generation begins
StatusFinal
- When generation completes
Arguments:
name
- Either a domain class name (case-sensitive) or a wildcard (*). If you specify the wildcard then controllers and views will be generated for all domain classes.