Module: CurrentSession::SessionMethods::UidSession
- Defined in:
- lib/current_session/session_methods/uid_session.rb
Overview
Implementation of using UIDs as session tokens
Instance Method Summary collapse
Instance Method Details
#create(user) ⇒ Object
13 14 15 |
# File 'lib/current_session/session_methods/uid_session.rb', line 13 def create(user) user.uid end |
#destroy ⇒ Object
17 18 |
# File 'lib/current_session/session_methods/uid_session.rb', line 17 def destroy end |
#find(&block) ⇒ Object
9 10 11 |
# File 'lib/current_session/session_methods/uid_session.rb', line 9 def find(&block) user_class.find_by(uid: session_token).try(&block) end |