2004-12-09 10:54:22 -05:00
|
|
|
GENERATOR
|
|
|
|
model - create model stub files
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
SYNOPSIS
|
2004-12-09 10:54:22 -05:00
|
|
|
generate model ModelName
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
DESCRIPTION
|
2004-12-09 10:54:22 -05:00
|
|
|
The model generator takes a model name and generates an empty model in
|
|
|
|
app/models, a test suite in test/unit with one passing test case, and a
|
|
|
|
fixtures YAML file in the test/fixtures directory.
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
EXAMPLE
|
2004-12-09 10:54:22 -05:00
|
|
|
./script/generate model Account
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
This will generate an Account class in app/models/account.rb, an
|
2004-12-09 10:54:22 -05:00
|
|
|
AccountTest in test/unit/account_test.rb, and the fixtures file
|
|
|
|
test/fixtures/account.yml.
|