aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-07-26 19:35:16 +0530
committerXavier Noria <fxn@hashref.com>2011-08-04 16:40:24 -0700
commit2dc6cca773380e55d2afe0d3de34fa7c68f9f7d7 (patch)
tree98020871036b8d449e7f87227b5b63415dacf78f
parent4265f2eaa50b9783059bc84c3f8d2d4001fa9b7a (diff)
downloadrails-2dc6cca773380e55d2afe0d3de34fa7c68f9f7d7.tar.gz
rails-2dc6cca773380e55d2afe0d3de34fa7c68f9f7d7.tar.bz2
rails-2dc6cca773380e55d2afe0d3de34fa7c68f9f7d7.zip
move the note after the scaffold files listing
-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