aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/model/USAGE
blob: 9d5a2fd749c6f83c7cd497e34d99bb127cf5efe5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description:
    The model generator creates stubs for a new model.

    The generator takes a model name as its argument.  The model name may be
    given in CamelCase or under_score and should not be suffixed with 'Model'.

    The generator creates a model class in app/models, a test suite in
    test/unit, and test fixtures in test/fixtures/singular_name.yml.

Example:
    ./script/generate model Account

    This will create an Account model:
        Model:      app/models/account.rb
        Test:       test/unit/account_test.rb
        Fixtures:   test/fixtures/accounts.yml