diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index 46f57dd..a3a27ce 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -182,7 +182,14 @@ class CmsController < MyProfileController if request.post? @article.destroy session[:notice] = _("\"#{@article.name}\" was removed.") - redirect_to :action => (@article.parent ? 'view' : 'index'), :id => @article.parent + referer = ActionController::Routing::Routes.recognize_path URI.parse(request.referer).path + if referer and referer[:controller] == 'cms' + redirect_to referer + elsif @article.parent + redirect_to @article.parent.url + else + redirect_to profile.url + end end end -- libgit2 0.21.2