lib/login_system.rb
# Refresh the cookie auth token if it exists, create it otherwise
Refresh the cookie auth token if it exists, create it otherwise
Refresh the cookie auth token if it exists create it otherwise
def handle_remember_cookie! new_cookie_flag
      return unless @logged_in_user
      case
        when valid_remember_cookie? then @logged_in_user.refresh_token
        when new_cookie_flag        then @logged_in_user.remember_me 
        else                             @logged_in_user.forget_me
      end
      send_remember_cookie!
    end
def handle_remember_cookie! new_cookie_flag return unless @logged_in_user case when valid_remember_cookie? then @logged_in_user . refresh_token when new_cookie_flag then @logged_in_user . remember_me else @logged_in_user . forget_me end send_remember_cookie! end
Refresh the cookie auth token if it exists, create it otherwise
Refresh the cookie auth token if it exists create it otherwise
new_cookie_flag
<not_specific>