diff options
author | Philip Arndt <parndt@gmail.com> | 2012-02-01 16:34:06 +1300 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2012-02-01 16:34:06 +1300 |
commit | 33bfa4dd231e4042456b3a70059c9cf57af858cf (patch) | |
tree | d51f175d17423e128cf23b294686fbb361a58189 /app/controllers/refinery/blog/admin/comments_controller.rb | |
parent | 30ebf2d338cdd1eff3f78fe4f865c98c02b0ad7e (diff) | |
download | refinerycms-blog-33bfa4dd231e4042456b3a70059c9cf57af858cf.tar.gz refinerycms-blog-33bfa4dd231e4042456b3a70059c9cf57af858cf.tar.bz2 refinerycms-blog-33bfa4dd231e4042456b3a70059c9cf57af858cf.zip |
Added support for new code in Refinery CMS since resolve/refinerycms#1234
Diffstat (limited to 'app/controllers/refinery/blog/admin/comments_controller.rb')
-rw-r--r-- | app/controllers/refinery/blog/admin/comments_controller.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/controllers/refinery/blog/admin/comments_controller.rb b/app/controllers/refinery/blog/admin/comments_controller.rb index f9addaa..8565b28 100644 --- a/app/controllers/refinery/blog/admin/comments_controller.rb +++ b/app/controllers/refinery/blog/admin/comments_controller.rb @@ -2,7 +2,7 @@ module Refinery module Blog module Admin class CommentsController < ::Refinery::AdminController - + cache_sweeper Refinery::BlogSweeper crudify :'refinery/blog/comment', @@ -11,35 +11,35 @@ module Refinery def index @comments = Refinery::Blog::Comment.unmoderated.page(params[:page]) - + render :action => 'index' end def approved unless params[:id].present? @comments = Refinery::Blog::Comment.approved.page(params[:page]) - + render :action => 'index' else @comment = Refinery::Blog::Comment.find(params[:id]) @comment.approve! flash[:notice] = t('approved', :scope => 'refinery.blog.admin.comments', :author => @comment.name) - - redirect_to main_app.url_for(:action => params[:return_to] || 'index') + + redirect_to refinery.url_for(:action => params[:return_to] || 'index', :id => nil) end end def rejected unless params[:id].present? @comments = Refinery::Blog::Comment.rejected.page(params[:page]) - + render :action => 'index' else @comment = Refinery::Blog::Comment.find(params[:id]) @comment.reject! flash[:notice] = t('rejected', :scope => 'refinery.blog.admin.comments', :author => @comment.name) - - redirect_to main_app.url_for(:action => params[:return_to] || 'index') + + redirect_to refinery.url_for(:action => params[:return_to] || 'index', :id => nil) end end |