blob: f0669104fec152a220781c513aa59355aa4742b1 (
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/model_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
|