I came across this method called record that Ryan bates uses in his authlogic Railscast and can't seem to understand what it does. I have been through the documentation but I can't seem to follow how that helper is useful.
def current_user
return @current_user if defined?(@current_user)
current_user_session && current_user_session.record
end
What I want to know is does this simply fetch the record from the database and why is it different from the standard way of fetching data from the database.
Thank you.