From 109184377f96db0530228cb3a8c38fe042e710c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Wed, 27 Jul 2011 22:41:42 +0300 Subject: Move per_page pagination stuff into model to dry up posts controller. --- app/models/refinery/blog_post.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/models') diff --git a/app/models/refinery/blog_post.rb b/app/models/refinery/blog_post.rb index 12ce6f2..5eb2a6f 100644 --- a/app/models/refinery/blog_post.rb +++ b/app/models/refinery/blog_post.rb @@ -111,6 +111,9 @@ module Refinery end end end + + # how many items to show per page + paginates_per Refinery::Setting.find_or_set(:blog_posts_per_page, 10) end end -- cgit v1.2.3