From 7028ef3dddd8559c8e5519431d3529c0c99872cc Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Fri, 1 Jul 2011 09:14:46 +1200 Subject: Making use of modules and putting classes under modules. --- app/controllers/blog/categories_controller.rb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'app/controllers/blog/categories_controller.rb') 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 -- cgit v1.2.3