diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-29 02:07:08 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-29 02:07:08 +0000 |
commit | 20fa105c353331eebef0843afa3d71505f7475f5 (patch) | |
tree | 0cec10dc34eda15727591e696dd2672c0c68cb83 /railties/lib/rails_generator/generators/components/controller/USAGE | |
parent | 06744bb4c5777cae45dca3b0ed4826ab14cbc558 (diff) | |
download | rails-20fa105c353331eebef0843afa3d71505f7475f5.tar.gz rails-20fa105c353331eebef0843afa3d71505f7475f5.tar.bz2 rails-20fa105c353331eebef0843afa3d71505f7475f5.zip |
Wordsmith generator USAGEs.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6884 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/controller/USAGE')
-rw-r--r-- | railties/lib/rails_generator/generators/components/controller/USAGE | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/railties/lib/rails_generator/generators/components/controller/USAGE b/railties/lib/rails_generator/generators/components/controller/USAGE index 246a3d652b..d4fae60c81 100644 --- a/railties/lib/rails_generator/generators/components/controller/USAGE +++ b/railties/lib/rails_generator/generators/components/controller/USAGE @@ -1,17 +1,16 @@ Description: - The controller generator creates stubs for a new controller and its views. + Stubs out a new controller and its views. Pass the controller name, either + CamelCased or under_scored, and a list of views as arguments. - The generator takes a controller name and a list of views as arguments. - The controller name may be given in CamelCase or under_score and should - not be suffixed with 'Controller'. To create a controller within a - module, specify the controller name as 'module/controller'. + To create a controller within a module, specify the controller name as a + path like 'parent_module/controller_name'. - The generator creates a controller class in app/controllers with view - templates in app/views/controller_name, a helper class in app/helpers, - and a functional test suite in test/functional. + This generates a controller class in app/controllers, view templates in + app/views/controller_name, a helper class in app/helpers, and a functional + test suite in test/functional. Example: - ./script/generate controller CreditCard open debit credit close + `./script/generate controller CreditCard open debit credit close` Credit card controller with URLs like /credit_card/debit. Controller: app/controllers/credit_card_controller.rb @@ -20,7 +19,7 @@ Example: Test: test/functional/credit_card_controller_test.rb Modules Example: - ./script/generate controller 'admin/credit_card' suspend late_fee + `./script/generate controller 'admin/credit_card' suspend late_fee` Credit card admin controller with URLs /admin/credit_card/suspend. Controller: app/controllers/admin/credit_card_controller.rb |