Module: Authpds::Helpers::CurrentUserHelper
- Included in:
- Controllers::AuthpdsController
- Defined in:
- lib/authpds/helpers/current_user_helper.rb
Instance Method Summary collapse
-
#current_user ⇒ Object
Get the current User if there is a UserSession.
-
#current_user_session ⇒ Object
Get the current UserSession if it exists.
Instance Method Details
#current_user ⇒ Object
Get the current User if there is a UserSession
10 11 12 13 14 |
# File 'lib/authpds/helpers/current_user_helper.rb', line 10 def current_user if current_user_session.present? @current_user ||= current_user_session.record end end |
#current_user_session ⇒ Object
Get the current UserSession if it exists
5 6 7 |
# File 'lib/authpds/helpers/current_user_helper.rb', line 5 def current_user_session @current_user_session ||= UserSession.find end |