Class ControllerGenerator
In: lib/mack/generators/controller_generator/controller_generator.rb
Parent: Genosaurus

Generates a controller for Mack applications.

Example:

  rake generate:controller name=post # => Generates a PostsController that includes Mack::Controller.

Or you can get the generator to create some actions for you this way:

  rake generator:controller name=post actions=index,show # => Generates a PostController with a placeholder for the index and show actions.

Finally, the controller generator includes a magic word for the actions parameter:

  rake generator:controller name=post actions=restful # => Generates a PostsController with the 7 rest actions.

[Validate]