aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/blog/categories_controller.rb
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2011-07-01 09:14:46 +1200
committerPhilip Arndt <parndt@gmail.com>2011-07-01 09:14:46 +1200
commit7028ef3dddd8559c8e5519431d3529c0c99872cc (patch)
tree6b8aa08e5f8713b85fc1bbf4a2460c001e516822 /app/controllers/blog/categories_controller.rb
parent47a71b309f4fb364449167ddc6ed978b6969e047 (diff)
downloadrefinerycms-blog-7028ef3dddd8559c8e5519431d3529c0c99872cc.tar.gz
refinerycms-blog-7028ef3dddd8559c8e5519431d3529c0c99872cc.tar.bz2
refinerycms-blog-7028ef3dddd8559c8e5519431d3529c0c99872cc.zip
Making use of modules and putting classes under modules.
Diffstat (limited to 'app/controllers/blog/categories_controller.rb')
-rw-r--r--app/controllers/blog/categories_controller.rb20
1 files changed, 11 insertions, 9 deletions
diff --git a/app/controllers/blog/categories_controller.rb b/app/controllers/blog/categories_controller.rb
index 35a87c3..efda778 100644
--- a/app/controllers/blog/categories_controller.rb
+++ b/app/controllers/blog/categories_controller.rb
@@ -1,11 +1,13 @@
-class Blog::CategoriesController < BlogController
+module Blog
+ class CategoriesController < BlogController
- def show
- @category = BlogCategory.find(params[:id])
- @blog_posts = @category.posts.live.includes(:comments, :categories).paginate({
- :page => params[:page],
- :per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
- })
- end
+ def show
+ @category = BlogCategory.find(params[:id])
+ @blog_posts = @category.posts.live.includes(:comments, :categories).paginate({
+ :page => params[:page],
+ :per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
+ })
+ end
-end
+ end
+end \ No newline at end of file