Controller

Generates a controller.

Command

$ eucalypt generate controller
# Alias/shortened
$ eucalypt g controller
$ eucalypt g c

Arguments

  • [NAME] - The name of the controller.

Options/flags

  • --spec, --no-spec, (Default: True)

    Specify whether or not to generate a spec file along with the controller.

  • --rest alias -r, (Default: False)

    Specify whether or not to generate a REST-style controller, with BREAD method route handler templates.

Examples

  • $ eucalypt g controller tweet

    Generates a new controller with default options.

  • $ eucalypt g controller tweet --no-spec

    Generates a new controller without a corresponding spec file.

  • $ eucalypt g controller tweet -r

    Generates a REST-style controller.

Last updated