aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails/scaffold_controller/USAGE
blob: d60a3c36807fceef66817d7521e3f874112b7c56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description:
    Stubs out a scaffolded controller and its views. Pass the model name,
    either CamelCased or under_scored, and a list of views as arguments.
    The controller name is retrieved as a pluralized version of the model
    name.

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

    This generates a controller class in app/controllers and invokes helper,
    template engine and test framework generators.

Example:
    `./script/generate scaffold_controller CreditCard`

    Credit card controller with URLs like /credit_card/debit.
        Controller:      app/controllers/credit_cards_controller.rb
        Functional Test: test/functional/credit_cards_controller_test.rb
        Views:           app/views/credit_cards/index.html.erb [...]
        Helper:          app/helpers/credit_cards_helper.rb