Strip return to path

This commit is contained in:
Martin Lensment 2015-03-23 16:50:53 +02:00
parent 5f2e0619e5
commit d94d50a174
2 changed files with 4 additions and 11 deletions

View file

@ -16,16 +16,10 @@ class ApplicationController < ActionController::Base
end
def after_sign_in_path_for(_resource)
if session[:user_return_to]
return session[:user_return_to].to_s
end
if request.path.match('registrar')
registrar_invoices_path
elsif request.path.match('admin')
rt = session[:user_return_to].to_s.presence
return session[:user_return_to].to_s if rt && rt != admin_login_path
admin_dashboard_path
end
end
def after_sign_out_path_for(_resource)
if request.path.match('registrar')

View file

@ -11,7 +11,6 @@ class Registrar::SessionsController < SessionsController
end
def login
end
def login_mid