mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Basic login
This commit is contained in:
parent
ba93ac8162
commit
c997f2da5d
18 changed files with 428 additions and 3 deletions
|
@ -2,4 +2,12 @@ class ApplicationController < ActionController::Base
|
|||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
if current_user.admin?
|
||||
(session[:user_return_to].nil?) ? admin_root_path : session[:user_return_to].to_s
|
||||
else
|
||||
(session[:user_return_to].nil?) ? client_root_path : session[:user_return_to].to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue