Add another login path

This commit is contained in:
Martin Lensment 2015-03-24 17:25:26 +02:00
parent 93838f0da0
commit efd3e4a565

View file

@ -17,7 +17,7 @@ class ApplicationController < ActionController::Base
def after_sign_in_path_for(_resource)
rt = session[:user_return_to].to_s.presence
login_paths = [admin_login_path, registrar_login_path]
login_paths = [admin_login_path, registrar_login_path, '/login']
return rt if rt && !login_paths.include?(rt)
if request.path.match('registrar')