Skip to content
This repository
Browse code

use new routes in templates

  • Loading branch information...
commit 603e0f155d66e2cab56caa65d007c7ba6c6cf03b 1 parent 9ed385f
Vijay Dev authored
6  railties/guides/source/rails_application_templates.textile
Source Rendered
@@ -37,7 +37,7 @@ Rails templates API is very self explanatory and easy to understand. Here's an e
37 37
 # template.rb
38 38
 run "rm public/index.html"
39 39
 generate(:scaffold, "person name:string")
40  
-route "map.root :controller => 'people'"
  40
+route "root :to => 'people#index'"
41 41
 rake("db:migrate")
42 42
 
43 43
 git :init
@@ -49,7 +49,7 @@ The following sections outlines the primary methods provided by the API :
49 49
 
50 50
 h4. gem(name, options = {})
51 51
 
52  
-Adds a +config.gem+ entry for the supplied gem to the generated application’s +config/environment.rb+.
  52
+Adds a +gem+ entry for the supplied gem to the generated application’s +Gemfile+.
53 53
 
54 54
 For example, if your application depends on the gems +bj+ and +nokogiri+ :
55 55
 
@@ -183,7 +183,7 @@ h4. route(routing_code)
183 183
 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 :
184 184
 
185 185
 <ruby>
186  
-route "map.root :controller => :person"
  186
+route "root :to => 'person#index'"
187 187
 </ruby>
188 188
 
189 189
 h4. inside(dir)

0 notes on commit 603e0f1

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