(Quick Reference)

create-scaffold-controller

Purpose

The create-scaffold-controller command creates a controller that scaffolds the given domain class, based on convention.

Examples

grails create-scaffold-controller org.bookstore.Book

Description

Creates a dynamic scaffolding controller for the given domain class. If the domain class does not exist, the command will fail. With the above example, this command will create the file grails-app/controllers/org/bookstore/BookController.groovy that declares a controller class containing a static scaffold property.

Note that this command is just for convenience and you can also create dynamic scaffolding controllers in your favourite text editor or IDE if you choose.

Usage:

grails create-scaffold-controller [name]

Fired Events:

  • CreatedFile - When the controller is created