Skip to content
This repository
Browse code

move the note after the scaffold files listing

  • Loading branch information...
commit d2c9c9ef4dae12e0d69847542cfe31e5672e724a 1 parent b0b7070
Vijay Dev vijaydev authored fxn committed

Showing 1 changed file with 11 additions and 15 deletions. Show diff stats Hide diff stats

  1. +11 15 railties/guides/source/getting_started.textile
26 railties/guides/source/getting_started.textile
Source Rendered
@@ -536,21 +536,8 @@ command in your terminal:
536 536 $ rails generate scaffold Post name:string title:string content:text
537 537 </shell>
538 538
539   -This will create a new database table called posts (plural of Post). The table
540   -will have three columns, name (type string), title (type string) and content
541   -(type text). It will also hook this new database up to Rails (details below).
542   -
543   -NOTE. While scaffolding will get you up and running quickly, the code it
544   -generates is unlikely to be a perfect fit for your application. You'll most
545   -probably want to customize the generated code. Many experienced Rails developers
546   -avoid scaffolding entirely, preferring to write all or most of their source code
547   -from scratch. Rails, however, makes it really simple to customize templates for
548   -generated models, controllers, views and other source files. You'll find more
549   -information in the "Creating and Customizing Rails Generators &
550   -Templates":generators.html guide.
551   -
552   -The scaffold generator will build 17 files in your application, along with some
553   -folders, and edit one more. Here's a quick overview of what it creates:
  539 +The scaffold generator will build several files in your application, along with some
  540 +folders, and edit <tt>config/routes.rb</tt>. Here's a quick overview of what it creates:
554 541
555 542 |_.File |_.Purpose|
556 543 |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:
571 558 |test/unit/helpers/posts_helper_test.rb |Unit testing harness for the posts helper|
572 559 |config/routes.rb |Edited to include routing information for posts|
573 560
  561 +NOTE. While scaffolding will get you up and running quickly, the code it
  562 +generates is unlikely to be a perfect fit for your application. You'll most
  563 +probably want to customize the generated code. Many experienced Rails developers
  564 +avoid scaffolding entirely, preferring to write all or most of their source code
  565 +from scratch. Rails, however, makes it really simple to customize templates for
  566 +generated models, controllers, views and other source files. You'll find more
  567 +information in the "Creating and Customizing Rails Generators &
  568 +Templates":generators.html guide.
  569 +
574 570 h4. Running a Migration
575 571
576 572 One of the products of the +rails generate scaffold+ command is a _database

0 comments on commit d2c9c9e

Please sign in to comment.
Something went wrong with that request. Please try again.