diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 22:41:42 +0300 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 22:41:42 +0300 |
commit | 109184377f96db0530228cb3a8c38fe042e710c0 (patch) | |
tree | 381fbe74bbc70ea899665411e40677599611bdec /app/models | |
parent | 164dc27a42876efdbd14db9e2d14311b4c119e52 (diff) | |
download | refinerycms-blog-109184377f96db0530228cb3a8c38fe042e710c0.tar.gz refinerycms-blog-109184377f96db0530228cb3a8c38fe042e710c0.tar.bz2 refinerycms-blog-109184377f96db0530228cb3a8c38fe042e710c0.zip |
Move per_page pagination stuff into model to dry up posts controller.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/refinery/blog_post.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |