From b8717e4fe005a8df13a4983943184881f87d97be Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 15 Aug 2009 22:29:57 +0200 Subject: added pagination for aggregators. costed me the whole day. crappy plugins ARGH! More work to do! --- app/helpers/content_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 5f6143b..6309c8b 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb @@ -77,9 +77,11 @@ module ContentHelper # Takes the parameters from the aggregate? method and renders the collection # from Page.aggregate(options) with a given partial def render_collection options + @content_collection = Page.aggregate(options, params[:page]) + render( :partial => options[:partial], - :collection => Page.aggregate(options), + :collection => @content_collection, :as => :page ) end -- cgit v1.3