From 3af611abb212052351f0979b85027adafce87a69 Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 1 Dec 2009 23:02:39 +0100 Subject: dramatically reduced instanciated AR objects for tags --- app/controllers/tags_controller.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index c965443..d235601 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -11,12 +11,13 @@ class TagsController < ApplicationController tag_name = @tag ? @tag.name : nil @page = Page.new - @pages = Page.heads.find_tagged_with( - tag_name, :order => 'published_at DESC' - ).paginate( - :page=>params[:page], - :per_page => 23 - ) + @pages = Page.heads.paginate( + Page.find_options_for_find_tagged_with(tag_name).merge( + :order => 'published_at DESC', + :page=>params[:page], + :per_page => 23 + ) + ) end end -- cgit v1.3