(Quick Reference)
generate-all
Purpose
Generates a controller and views for the given domain class
Examples
grails generate-all 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 allows you to generate an implementation of CRUD including a controller and views for the given domain class. So for a domain class
Book
a controller in
grails-app/controllers/BookController.groovy
and views in
grails-app/views/book
will be generated.
Usage:
grails generate-all [domain class name or wildcard]
Fired Events:
StatusUpdate
- When generation begins
StatusFinal
- When generation completes