Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def current_user_session
- return @current_user_session if defined?(@current_user_session)
- @current_user_session = UserSession.find
- end
- def current_user
- return @current_user if defined?(@current_user)
- @current_user = current_user_session && current_user_session.record
- end
Add Comment
Please, Sign In to add comment