% bundle exec rails g scaffold
Usage:
rails generate scaffold NAME [field[:type][:index] field[:type][:index]][options]Options:
[--skip-namespace], [--no-skip-namespace]# Skip namespace (affects only isolated applications) -o, --orm=NAME # Orm to be invoked# Default: active_record[--force-plural], [--no-force-plural]# Forces the use of a plural ModelName[--model-name=MODEL_NAME]# ModelName to be used[--resource-route], [--no-resource-route]# Indicates when to generate resource route# Default: true -y, [--stylesheets], [--no-stylesheets]# Generate Stylesheets# Default: true -se, [--stylesheet-engine=STYLESHEET_ENGINE]# Engine for Stylesheets# Default: scss[--assets], [--no-assets]# Indicates when to generate assets# Default: true -c, --scaffold-controller=NAME # Scaffold controller to be invoked# Default: scaffold_controllerActiveRecord options:
[--migration], [--no-migration]# Indicates when to generate migration# Default: true[--timestamps], [--no-timestamps]# Indicates when to generate timestamps# Default: true[--parent=PARENT]# The parent class for the generated model[--indexes], [--no-indexes]# Add indexes for references and belongs_to columns# Default: true -t, [--test-framework=NAME]# Test framework to be invoked# Default: test_unitTestUnit options:
[--fixture], [--no-fixture]# Indicates when to generate fixture# Default: true -r, [--fixture-replacement=NAME]# Fixture replacement to be invokedScaffoldController options:
-e, [--template-engine=NAME]# Template engine to be invoked# Default: slim[--helper]# Indicates when to generate helper[--jbuilder]# Indicates when to generate jbuilder# Default: trueSlim options:
[--form-builder=NAME]# Form builder to be invokedAsset options:
-j, [--javascripts], [--no-javascripts]# Generate JavaScripts# Default: true -je, [--javascript-engine=JAVASCRIPT_ENGINE]# Engine for JavaScripts# Default: coffeeRuntime options:
-f, [--force]# Overwrite files that already exist -p, [--pretend], [--no-pretend]# Run but do not make any changes -q, [--quiet], [--no-quiet]# Suppress status output -s, [--skip], [--no-skip]# Skip files that already exist