diff options
author | Jamie Winsor <jamie@enmasse.com> | 2011-09-19 15:35:47 -0700 |
---|---|---|
committer | Jamie Winsor <jamie@enmasse.com> | 2011-09-19 15:35:47 -0700 |
commit | d37ef11f63904b0daa0dcf240dd5a55025423af3 (patch) | |
tree | 21838dd05009849dd02110a4b5dafb51af38a36a /app/controllers/refinery/blog_controller.rb | |
parent | 7fe5fe5de6a0e7ef8ac011d7d6b85c61a2f6be96 (diff) | |
download | refinerycms-blog-d37ef11f63904b0daa0dcf240dd5a55025423af3.tar.gz refinerycms-blog-d37ef11f63904b0daa0dcf240dd5a55025423af3.tar.bz2 refinerycms-blog-d37ef11f63904b0daa0dcf240dd5a55025423af3.zip |
Abstract filter methods into controller helpers
This will enable users to include the controller helper into their
own controllers to perform common functions - such as finding a blog
post or listing all blog posts.
Diffstat (limited to 'app/controllers/refinery/blog_controller.rb')
-rw-r--r-- | app/controllers/refinery/blog_controller.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/refinery/blog_controller.rb b/app/controllers/refinery/blog_controller.rb index cbafdeb..b875b44 100644 --- a/app/controllers/refinery/blog_controller.rb +++ b/app/controllers/refinery/blog_controller.rb @@ -1,5 +1,7 @@ module Refinery class BlogController < ::ApplicationController + + include BlogControllerHelper helper :'refinery/blog_posts' before_filter :find_page, :find_all_blog_categories @@ -9,10 +11,5 @@ module Refinery def find_page @page = Refinery::Page.find_by_link_url("/blog") end - - def find_all_blog_categories - @blog_categories = Refinery::BlogCategory.all - end - end end |