Skip to content

Commit

Permalink
Clarify scaffold generator explanation [ci-skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanhefner committed Feb 13, 2022
1 parent 04110b2 commit 73e0a9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guides/source/command_line.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ $ bin/rails generate scaffold HighScore game:string score:integer
create app/views/high_scores/_high_score.json.jbuilder
```
The generator checks that there exist the directories for models, controllers, helpers, layouts, functional and unit tests, stylesheets, creates the views, controller, model and database migration for HighScore (creating the `high_scores` table and fields), takes care of the route for the **resource**, and new tests for everything.
The generator creates the model, views, controller, **resource** route, and database migration (which creates the `high_scores` table) for HighScore. And it adds tests for those.
The migration requires that we **migrate**, that is, run some Ruby code (living in that `20130717151933_create_high_scores.rb`) to modify the schema of our database. Which database? The SQLite3 database that Rails will create for you when we run the `bin/rails db:migrate` command. We'll talk more about that command below.
The migration requires that we **migrate**, that is, run some Ruby code (the `20190416145729_create_high_scores.rb` file from the above output) to modify the schema of our database. Which database? The SQLite3 database that Rails will create for you when we run the `bin/rails db:migrate` command. We'll talk more about that command below.
```bash
$ bin/rails db:migrate
Expand Down

0 comments on commit 73e0a9c

Please sign in to comment.