diff options
Diffstat (limited to 'app/helpers/refinery')
-rw-r--r-- | app/helpers/refinery/blog/controller_helper.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/helpers/refinery/blog/controller_helper.rb b/app/helpers/refinery/blog/controller_helper.rb index 035275c..bf4926b 100644 --- a/app/helpers/refinery/blog/controller_helper.rb +++ b/app/helpers/refinery/blog/controller_helper.rb @@ -5,9 +5,9 @@ module Refinery protected def find_blog_post - unless (@blog_post = Refinery::Blog::Post.find(params[:id])).try(:live?) + unless (@post = Refinery::Blog::Post.find(params[:id])).try(:live?) if refinery_user? and current_refinery_user.authorized_plugins.include?("refinerycms_blog") - @blog_post = Refinery::Blog::Post.find(params[:id]) + @post = Refinery::Blog::Post.find(params[:id]) else error_404 end @@ -15,15 +15,14 @@ module Refinery end def find_all_blog_posts - @blog_posts = Refinery::Blog::Post.live.includes(:comments, :categories).page(params[:page]) + @posts = Refinery::Blog::Post.live.includes(:comments, :categories).page(params[:page]) end def find_tags @tags = Refinery::Blog::Post.tag_counts_on(:tags) end - def find_all_blog_categories - @blog_categories = Refinery::Blog::Category.all + @categories = Refinery::Blog::Category.all end end end |