Scaffold
Generates a scaffold.
Command
$ eucalypt generate scaffold
# Alias/shortened
$ eucalypt g scaffold
$ eucalypt g sArguments
[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
--noalias-n, (Possible values: [h, hs, c, cs, m, ms])Specify what files to omit during the generation of the scaffold:
h- Helper filehs- Helper spec filec- Controller filecs- Controller spec filem- Model filems- Model spec file
--restalias-r, (Default: False)Specify whether or not to generate a REST-style controller, with BREAD 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 tweetGenerates a new scaffold with default options (and no columns).
$ eucalypt g scaffold tweet text:string likes:integerGenerates a new scaffold with default options (and two columns)
$ eucalypt g scaffold tweet -n h hs ms csGenerates a new scaffold without a helper, helper spec, model spec or controller spec (and no columns).
$ eucalypt g scaffold tweet --no-tableGenerates a new scaffold with no table creation migration.
$ eucalypt g scaffold tweet -rGenerates a new scaffold with a REST-style controller.
Last updated