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

Scaffold

Generates a scaffold.

PreviousModelNextDestroy

Last updated 5 years ago

Command

$ eucalypt generate scaffold
# Alias/shortened
$ eucalypt g scaffold
$ eucalypt g s

Arguments

  • [NAME] - The name of the scaffold.

  • *[COLUMN:TYPE] - The columns/attributes for the model's database table, along with their types (argument can be empty).

Options/flags

  • --no alias -n, (Possible values: [h, hs, c, cs, m, ms])

    Specify what files to omit during the generation of the scaffold:

    • h - Helper file

    • hs - Helper spec file

    • c - Controller file

    • cs - Controller spec file

    • m - Model file

    • ms - Model spec file

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

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

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

    Specify whether or not to generate a table creation migration along with the model.

Examples

  • $ eucalypt g scaffold tweet

    Generates a new scaffold with default options (and no columns).

  • $ eucalypt g scaffold tweet text:string likes:integer

    Generates a new scaffold with default options (and two columns)

  • $ eucalypt g scaffold tweet -n h hs ms cs

    Generates a new scaffold without a helper, helper spec, model spec or controller spec (and no columns).

  • $ eucalypt g scaffold tweet --no-table

    Generates a new scaffold with no table creation migration.

  • $ eucalypt g scaffold tweet -r

    Generates a new scaffold with a REST-style controller.

BREAD