Skip to content

Instantly share code, notes, and snippets.

@futoase
Last active December 14, 2015 07:59
Show Gist options
  • Select an option

  • Save futoase/5054757 to your computer and use it in GitHub Desktop.

Select an option

Save futoase/5054757 to your computer and use it in GitHub Desktop.
class User
def authorize?
return @result if @result ||= nil
result = AuthorizedUser.find(:id => self[:id])
return false unless result
@result = result
return @result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment