mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-12 18:59:06 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/rails
12
tldr/rails
@@ -13,6 +13,18 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`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`
|
||||
|
||||
Reference in New Issue
Block a user