aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/refinery/blog/controller_helper.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/app/helpers/refinery/blog/controller_helper.rb b/app/helpers/refinery/blog/controller_helper.rb
index 74a189b..2b2add4 100644
--- a/app/helpers/refinery/blog/controller_helper.rb
+++ b/app/helpers/refinery/blog/controller_helper.rb
@@ -4,27 +4,27 @@ module Refinery
protected
- def find_blog_post
- unless (@blog_post = Refinery::BlogPost.find(params[:id])).try(:live?)
- if refinery_user? and current_user.authorized_plugins.include?("refinerycms_blog")
- @blog_post = Refinery::BlogPost.find(params[:id])
- else
- error_404
- end
+ def find_blog_post
+ unless (@blog_post = Refinery::BlogPost.find(params[:id])).try(:live?)
+ if refinery_user? and current_user.authorized_plugins.include?("refinerycms_blog")
+ @blog_post = Refinery::BlogPost.find(params[:id])
+ else
+ error_404
end
end
-
- def find_all_blog_posts
- @blog_posts = Refinery::BlogPost.live.includes(:comments, :categories).page(params[:page])
- end
+ end
+
+ def find_all_blog_posts
+ @blog_posts = Refinery::BlogPost.live.includes(:comments, :categories).page(params[:page])
+ end
- def find_tags
- @tags = Refinery::BlogPost.tag_counts_on(:tags)
- end
-
- def find_all_blog_categories
- @blog_categories = Refinery::BlogCategory.all
- end
+ def find_tags
+ @tags = Refinery::BlogPost.tag_counts_on(:tags)
+ end
+
+ def find_all_blog_categories
+ @blog_categories = Refinery::BlogCategory.all
+ end
end
end
end