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
+12
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`