Skip to content

Instantly share code, notes, and snippets.

@hmans

hmans/gist:51093

Created Jan 23, 2009
Embed
What would you like to do?
def current_user_session
return @current_user_session if defined?(@current_user_session)
@current_user_session = UserSession.find
end
kürzer:
def current_user_session
@current_user_session ||= UserSession.find
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.