From 33bfa4dd231e4042456b3a70059c9cf57af858cf Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Wed, 1 Feb 2012 16:34:06 +1300 Subject: Added support for new code in Refinery CMS since resolve/refinerycms#1234 --- .../refinery/blog/admin/comments_controller.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/controllers/refinery/blog/admin/comments_controller.rb') 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 -- cgit v1.2.3