aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2010-12-26 22:10:56 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2010-12-26 22:10:56 +0530
commit603e0f155d66e2cab56caa65d007c7ba6c6cf03b (patch)
treec5332c9d8452fe9a19e9f578b8feca35a48079ef /railties
parent9ed385fe1798bd469144c57dbfd89db6781d4ad6 (diff)
downloadrails-603e0f155d66e2cab56caa65d007c7ba6c6cf03b.tar.gz
rails-603e0f155d66e2cab56caa65d007c7ba6c6cf03b.tar.bz2
rails-603e0f155d66e2cab56caa65d007c7ba6c6cf03b.zip
use new routes in templates
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/rails_application_templates.textile6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/source/rails_application_templates.textile b/railties/guides/source/rails_application_templates.textile
index d4b887ad02..ca4f7798a6 100644
--- a/railties/guides/source/rails_application_templates.textile
+++ b/railties/guides/source/rails_application_templates.textile
@@ -37,7 +37,7 @@ Rails templates API is very self explanatory and easy to understand. Here's an e
# template.rb
run "rm public/index.html"
generate(:scaffold, "person name:string")
-route "map.root :controller => 'people'"
+route "root :to => 'people#index'"
rake("db:migrate")
git :init
@@ -49,7 +49,7 @@ The following sections outlines the primary methods provided by the API :
h4. gem(name, options = {})
-Adds a +config.gem+ entry for the supplied gem to the generated application’s +config/environment.rb+.
+Adds a +gem+ entry for the supplied gem to the generated application’s +Gemfile+.
For example, if your application depends on the gems +bj+ and +nokogiri+ :
@@ -183,7 +183,7 @@ h4. route(routing_code)
This adds a routing entry to the +config/routes.rb+ file. In above steps, we generated a person scaffold and also removed +public/index.html+. Now to make +PeopleController#index+ as the default page for the application :
<ruby>
-route "map.root :controller => :person"
+route "root :to => 'person#index'"
</ruby>
h4. inside(dir)