mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
rails: add generate
, db:migrate
, and routes
examples (#15674)
This commit is contained in:
parent
b28193e040
commit
5c6f553196
1 changed files with 12 additions and 0 deletions
|
@ -8,6 +8,18 @@
|
|||
|
||||
`rails new "{{project_name}}"`
|
||||
|
||||
- Generate a scaffold for a model named Post, predefining the attributes title and body:
|
||||
|
||||
`rails generate scaffold Post title:string body:text`
|
||||
|
||||
- Run migrations:
|
||||
|
||||
`rails db:migrate`
|
||||
|
||||
- List all routes:
|
||||
|
||||
`rails routes`
|
||||
|
||||
- Start local server for current project on port 3000:
|
||||
|
||||
`rails server`
|
||||
|
|
Loading…
Add table
Reference in a new issue