aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-07-26 19:35:16 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-07-26 19:35:16 +0530
commitfa159d317611d1fe5b483f2542666da00bab2e6c (patch)
tree481fe06a74792935b7da1e04dfc79b20e67e11ca /railties/guides
parentcb02d10df2b892925bfa8b2a9b01223e44f2acb4 (diff)
downloadrails-fa159d317611d1fe5b483f2542666da00bab2e6c.tar.gz
rails-fa159d317611d1fe5b483f2542666da00bab2e6c.tar.bz2
rails-fa159d317611d1fe5b483f2542666da00bab2e6c.zip
move the note after the scaffold files listing
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/getting_started.textile26
1 files changed, 11 insertions, 15 deletions
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index 6c8aa668b2..3cca383616 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -536,21 +536,8 @@ command in your terminal:
$ rails generate scaffold Post name:string title:string content:text
</shell>
-This will create a new database table called posts (plural of Post). The table
-will have three columns, name (type string), title (type string) and content
-(type text). It will also hook this new database up to Rails (details below).
-
-NOTE. While scaffolding will get you up and running quickly, the code it
-generates is unlikely to be a perfect fit for your application. You'll most
-probably want to customize the generated code. Many experienced Rails developers
-avoid scaffolding entirely, preferring to write all or most of their source code
-from scratch. Rails, however, makes it really simple to customize templates for
-generated models, controllers, views and other source files. You'll find more
-information in the "Creating and Customizing Rails Generators &
-Templates":generators.html guide.
-
-The scaffold generator will build 17 files in your application, along with some
-folders, and edit one more. Here's a quick overview of what it creates:
+The scaffold generator will build several files in your application, along with some
+folders, and edit <tt>config/routes.rb</tt>. Here's a quick overview of what it creates:
|_.File |_.Purpose|
|db/migrate/20100207214725_create_posts.rb |Migration to create the posts table in your database (your name will include a different timestamp)|
@@ -571,6 +558,15 @@ folders, and edit one more. Here's a quick overview of what it creates:
|test/unit/helpers/posts_helper_test.rb |Unit testing harness for the posts helper|
|config/routes.rb |Edited to include routing information for posts|
+NOTE. While scaffolding will get you up and running quickly, the code it
+generates is unlikely to be a perfect fit for your application. You'll most
+probably want to customize the generated code. Many experienced Rails developers
+avoid scaffolding entirely, preferring to write all or most of their source code
+from scratch. Rails, however, makes it really simple to customize templates for
+generated models, controllers, views and other source files. You'll find more
+information in the "Creating and Customizing Rails Generators &
+Templates":generators.html guide.
+
h4. Running a Migration
One of the products of the +rails generate scaffold+ command is a _database