tidy
This commit is contained in:
parent
83dd857776
commit
0964187f22
1 changed files with 0 additions and 3 deletions
|
|
@ -21,7 +21,6 @@ module Authentication
|
||||||
resume_session || request_authentication
|
resume_session || request_authentication
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def resume_session
|
def resume_session
|
||||||
Current.session ||= find_session_by_cookie
|
Current.session ||= find_session_by_cookie
|
||||||
end
|
end
|
||||||
|
|
@ -30,7 +29,6 @@ module Authentication
|
||||||
Session.find_by(id: cookies.signed[:session_id])
|
Session.find_by(id: cookies.signed[:session_id])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def request_authentication
|
def request_authentication
|
||||||
session[:return_to_after_authenticating] = request.url
|
session[:return_to_after_authenticating] = request.url
|
||||||
redirect_to new_session_path
|
redirect_to new_session_path
|
||||||
|
|
@ -40,7 +38,6 @@ module Authentication
|
||||||
session.delete(:return_to_after_authenticating) || root_url
|
session.delete(:return_to_after_authenticating) || root_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def start_new_session_for(user)
|
def start_new_session_for(user)
|
||||||
user.sessions.create!(user_agent: request.user_agent, ip_address: request.remote_ip).tap do |session|
|
user.sessions.create!(user_agent: request.user_agent, ip_address: request.remote_ip).tap do |session|
|
||||||
Current.session = session
|
Current.session = session
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue