From c6b9e47d5c59554d13d7dabedb651c7bf69da56b Mon Sep 17 00:00:00 2001
From: Vijay Dev <vijaydev.cse@gmail.com>
Date: Sat, 25 Dec 2010 23:27:15 +0530
Subject: use new routes

---
 railties/guides/source/performance_testing.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'railties/guides/source/performance_testing.textile')

diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile
index b9401f3559..8cdfaf3e41 100644
--- a/railties/guides/source/performance_testing.textile
+++ b/railties/guides/source/performance_testing.textile
@@ -60,8 +60,8 @@ Let's assume your application has the following controller and model:
 
 <ruby>
 # routes.rb
-map.root :controller => 'home'
-map.resources :posts
+root :to => 'home#index'
+resources :posts
 
 # home_controller.rb
 class HomeController < ApplicationController
-- 
cgit v1.2.3


From 2801efbc3b3a5c5cf3406aa7063852a86898f547 Mon Sep 17 00:00:00 2001
From: Vijay Dev <vijaydev.cse@gmail.com>
Date: Sat, 25 Dec 2010 23:59:57 +0530
Subject: use all and first instead of find(:all) and find(:first)

---
 railties/guides/source/performance_testing.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'railties/guides/source/performance_testing.textile')

diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile
index 8cdfaf3e41..341525a75c 100644
--- a/railties/guides/source/performance_testing.textile
+++ b/railties/guides/source/performance_testing.textile
@@ -436,7 +436,7 @@ h4. Model
 Project.benchmark("Creating project") do
   project = Project.create("name" => "stuff")
   project.create_manager("name" => "David")
-  project.milestones << Milestone.find(:all)
+  project.milestones << Milestone.all
 end
 </ruby>
 
-- 
cgit v1.2.3

