From: Jean-Philippe Lang Date: Tue, 10 Mar 2015 18:22:53 +0000 (+0000) Subject: Use named routes. X-Git-Tag: 3.1.0~213 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=840881c76a5d50af882c2b2badd1b9182656fce0;p=redmine.git Use named routes. git-svn-id: http://svn.redmine.org/redmine/trunk@14070 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e52cc6186..6c16f99c1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -240,11 +240,11 @@ class ApplicationController < ActionController::Base if request.xhr? head :unauthorized else - redirect_to :controller => "account", :action => "login", :back_url => url + redirect_to signin_path(:back_url => url) end } format.any(:atom, :pdf, :csv) { - redirect_to :controller => "account", :action => "login", :back_url => url + redirect_to signin_path(:back_url => url) } format.xml { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } format.js { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' }