mirror of https://github.com/CrimsonTome/tldr.git
20 lines
350 B
Markdown
20 lines
350 B
Markdown
|
# rails generate
|
||
|
|
||
|
> Generate new Rails templates in an existing project.
|
||
|
|
||
|
- List all available generators:
|
||
|
|
||
|
`rails generate`
|
||
|
|
||
|
- Generate a new model:
|
||
|
|
||
|
`rails generate model {{model_name}}`
|
||
|
|
||
|
- Generate a new controller:
|
||
|
|
||
|
`rails generate controller {{controller_name}}`
|
||
|
|
||
|
- Generate a scaffold for a new model:
|
||
|
|
||
|
`rails generate scaffold {{model_name}}`
|