I have the following helper methods in the application_controller.rb for authlogic:
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
I do not understand how the current_user_session method - specifically, how UserSession.find obtains the current user's session. I also do not understand what it is doing with find, where no argument is given.