aboutsummaryrefslogtreecommitdiffstats
path: root/railties/generators/scaffold/USAGE
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-13 15:49:26 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-13 15:49:26 +0000
commit52251baae48cf25ea06106569af3d04c76841210 (patch)
treeea55860662c17325bd077e231583326f37872d26 /railties/generators/scaffold/USAGE
parent9c09f81bc6bc08122e2835fb59e66d80751bd058 (diff)
downloadrails-52251baae48cf25ea06106569af3d04c76841210.tar.gz
rails-52251baae48cf25ea06106569af3d04c76841210.tar.bz2
rails-52251baae48cf25ea06106569af3d04c76841210.zip
Added the option to specify a controller name to "generate scaffold" and made the default controller name the plural form of the model.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@404 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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!