diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 13:46:24 +0300 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 13:46:24 +0300 |
commit | 3fa8937b95a4d90000ad1be9c588424052136455 (patch) | |
tree | 07e61cd13bd88a76d13c3d759475d67d088d5f6e /app/controllers/refinery/blog/categories_controller.rb | |
parent | e5db679226bac7ef8ddd568c40f52addd52d7a8a (diff) | |
download | refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.gz refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.bz2 refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.zip |
Rails 3.1 - wip.
Diffstat (limited to 'app/controllers/refinery/blog/categories_controller.rb')
-rw-r--r-- | app/controllers/refinery/blog/categories_controller.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/refinery/blog/categories_controller.rb b/app/controllers/refinery/blog/categories_controller.rb new file mode 100644 index 0000000..2c8c4c5 --- /dev/null +++ b/app/controllers/refinery/blog/categories_controller.rb @@ -0,0 +1,15 @@ +module Refinery + module Blog + class CategoriesController < BlogController + + def show + @category = Refinery::BlogCategory.find(params[:id]) + @blog_posts = @category.posts.live.includes(:comments, :categories).paginate({ + :page => params[:page], + :per_page => Refinery::Setting.find_or_set(:blog_posts_per_page, 10) + }) + end + + end + end +end |