From df595b577edf807c3b9315feb882d12d9b249af9 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Tue, 22 Jun 2010 10:29:59 -0300 Subject: Use the new query API in AR performance script. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activerecord/examples/performance.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/examples') diff --git a/activerecord/examples/performance.rb b/activerecord/examples/performance.rb index f69576b240..f7d358337c 100644 --- a/activerecord/examples/performance.rb +++ b/activerecord/examples/performance.rb @@ -116,15 +116,15 @@ RBench.run(TIMES) do end report 'Model.all limit(100)', (TIMES / 10).ceil do - ar { Exhibit.look Exhibit.all(:limit => 100) } + ar { Exhibit.look Exhibit.limit(100) } end report 'Model.all limit(100) with relationship', (TIMES / 10).ceil do - ar { Exhibit.feel Exhibit.all(:limit => 100, :include => :user) } + ar { Exhibit.feel Exhibit.limit(100).includes(:user) } end report 'Model.all limit(10,000)', (TIMES / 1000).ceil do - ar { Exhibit.look Exhibit.all(:limit => 10000) } + ar { Exhibit.look Exhibit.limit(10000) } end exhibit = { -- cgit v1.2.3