From b0187434bd7601a5b2e5f7afac99c964e566b9db Mon Sep 17 00:00:00 2001 From: Colin Curtin Date: Tue, 16 Dec 2008 23:06:11 -0800 Subject: Started working with the scaffold instead of model generator to teach models --- railties/doc/guides/source/command_line.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/railties/doc/guides/source/command_line.txt b/railties/doc/guides/source/command_line.txt index 1ad2e75c51..ee827ac3a8 100644 --- a/railties/doc/guides/source/command_line.txt +++ b/railties/doc/guides/source/command_line.txt @@ -200,11 +200,13 @@ Examples: creates a Post model with a string title, text body, and published flag. ------------------------------------------------------ -Let's set up a simple model called "HighScore" that will keep track of our highest score on video games we play. Then we'll wire up our controller and view to modify and list our scores. +But instead of generating a model directly (which we'll be doing later), let's set up a scaffold. A *scaffold* in Rails is a full set of model, database migration for that model, controller to manipulate it, views to view and manipulate the data, and a test suite for each of the above. + +Let's set up a simple resource called "HighScore" that will keep track of our highest score on video games we play. [source,shell] ------------------------------------------------------ -$ ./script/generate model HighScore id:integer game:string score:integer +$ ./script/generate scaffold HighScore id:integer game:string score:integer exists app/models/ exists test/unit/ exists test/fixtures/ -- cgit v1.2.3