diff options
author | Philip Arndt <parndt@gmail.com> | 2012-01-17 16:56:03 +1300 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2012-01-17 16:56:24 +1300 |
commit | b1e4fd00943a160f3eb6ce242463c0cc07a406fc (patch) | |
tree | 07fb750aa580b63d39c23589997956bf3a03594d /app/helpers/refinery | |
parent | b3a25c1b686d205fc6b8b409a8f90059ae6b934d (diff) | |
download | refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.tar.gz refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.tar.bz2 refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.zip |
Fixed namespacing for Refinery conventions.
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 |