Registrar refactor

This commit is contained in:
Priit Tark 2015-04-09 17:09:18 +03:00
parent 6573d81b94
commit ec4c06bb06
95 changed files with 564 additions and 539 deletions

View file

@ -0,0 +1,16 @@
class DeviseCustomFailure < Devise::FailureApp
def redirect_url
return registrar_login_url if request.original_fullpath.to_s.match(/^\/registrar/)
return admin_login_url if request.original_fullpath.to_s.match(/^\/admin/)
root_url
end
# You need to override respond to eliminate recall
def respond
if http_auth?
http_auth
else
redirect
end
end
end