mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-07 00:05:59 +02:00
rails-generate: add page (#2794)
This commit is contained in:
parent
c0f1360e99
commit
45b9aeaf94
1 changed files with 19 additions and 0 deletions
19
pages/common/rails-generate.md
Normal file
19
pages/common/rails-generate.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# 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}}`
|
Loading…
Add table
Reference in a new issue