Skip to content

Commit

Permalink
Correct Example output in Rails guides [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Kapoor committed Jun 7, 2014
1 parent 23a751c commit 269ad13
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions guides/source/command_line.md
Expand Up @@ -123,19 +123,18 @@ Usage: rails generate controller NAME [action action] [options]
Description: Description:
... ...


To create a controller within a module, specify the controller name as a To create a controller within a module, specify the controller name as a path like 'parent_module/controller_name'.
path like 'parent_module/controller_name'.


... ...


Example: Example:
`rails generate controller CreditCard open debit credit close` `rails generate controller CreditCards open debit credit close`


Credit card controller with URLs like /credit_card/debit. Credit card controller with URLs like /credit_cards/debit.
Controller: app/controllers/credit_card_controller.rb Controller: app/controllers/credit_card_controller.rb
Test: test/controllers/credit_card_controller_test.rb Test: test/controllers/credit_cards_controller_test.rb
Views: app/views/credit_card/debit.html.erb [...] Views: app/views/credit_cards/debit.html.erb [...]
Helper: app/helpers/credit_card_helper.rb Helper: app/helpers/credit_cards_helper.rb
``` ```


The controller generator is expecting parameters in the form of `generate controller ControllerName action1 action2`. Let's make a `Greetings` controller with an action of **hello**, which will say something nice to us. The controller generator is expecting parameters in the form of `generate controller ControllerName action1 action2`. Let's make a `Greetings` controller with an action of **hello**, which will say something nice to us.
Expand Down

0 comments on commit 269ad13

Please sign in to comment.