aboutsummaryrefslogtreecommitdiffstats
path: root/railties/generators/scaffold/USAGE
diff options
context:
space:
mode:
Diffstat (limited to 'railties/generators/scaffold/USAGE')
-rw-r--r--railties/generators/scaffold/USAGE14
1 files changed, 8 insertions, 6 deletions
diff --git a/railties/generators/scaffold/USAGE b/railties/generators/scaffold/USAGE
index 338ba5aaf5..a8c9ed8967 100644
--- a/railties/generators/scaffold/USAGE
+++ b/railties/generators/scaffold/USAGE
@@ -2,12 +2,14 @@ GENERATOR
scaffold - create a model and basic controller
SYNOPSIS
- generate scaffold ModelName [action ...]
+ generate scaffold ModelName [ControllerName] [action ...]
DESCRIPTION
The scaffold generator takes the name of the new model as the
- first argument and an optional list of controller actions as the
- subsequent arguments. Any actions with scaffolding code available
+ first argument, an optional controller name as the second, and
+ an optional list of controller actions as the subsequent arguments.
+ If the controller name is not specified, the plural form of the model
+ name will be used. Any actions with scaffolding code available
will be generated in your controller; others will be left as stubs.
The generated controller has the same code that "scaffold :model"
@@ -15,11 +17,11 @@ DESCRIPTION
your controller.
EXAMPLE
- ./script/generate scaffold Account debit credit
+ ./script/generate scaffold Account Bank debit credit
This will generate the Account model with unit tests and fixtures,
- the AccountController controller with actions, views, and tests for
+ the BankController controller with actions, views, and tests for
index, list, show, new, create, edit, update, and destroy.
Now create the accounts table in your database and browse to
- http://localhost/account/ -- voila, you're on Rails!
+ http://localhost/bank/ -- voila, you're on Rails!