eucalypt
>= 0.9.0
>= 0.9.0
  • eucalypt
  • Installation
  • CLI
    • Core
      • Init
      • Launch
      • Console
      • Test
      • Version
      • Rake
      • Help (-H)
    • Generate
      • Controller
      • Helper
      • Model
      • Scaffold
    • Destroy
      • Controller
      • Helper
      • Model
      • Scaffold
    • Blog
      • Setup
      • Article
        • List
        • Generate
        • Destroy
        • Edit
          • Urltitle
          • Datetime
    • Migration
      • Blank
      • Types
      • Create
        • Table
      • Add
        • Index
        • Column
      • Drop
        • Table
        • Index
        • Column
      • Rename
        • Table
        • Index
        • Column
      • Change
        • Column
  • Features
    • Controllers
    • Helpers
    • Views
      • Layouts
      • Partials
    • Static data
    • Core application file
    • Configuration
      • Logging
      • Asset pipeline
        • Manifest asset files
      • Initializers
      • Database
    • Manifest accessor
    • Application path helpers
    • Blog environment
      • Articles
    • Rendering static files
    • Maintenance mode
Powered by GitBook
On this page
  • Command
  • Arguments
  • Options/flags
  • Examples
  1. CLI
  2. Generate

Controller

Generates a controller.

PreviousGenerateNextHelper

Last updated 6 years ago

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 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.

BREAD