Skip to content

Commit

Permalink
rails: add generate, db:migrate, and routes examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonfigueroa authored Feb 1, 2025
1 parent 0f7f619 commit 53f05b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pages/common/rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 53f05b4

Please sign in to comment.