1
0
Fork 0
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:
Nelson Figueroa 2025-02-06 09:03:00 -08:00 committed by GitHub
parent b28193e040
commit 5c6f553196
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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`