Skip to content

Instantly share code, notes, and snippets.

@herestomwiththeweather
Created November 27, 2010 07:39
Show Gist options
  • Save herestomwiththeweather/717686 to your computer and use it in GitHub Desktop.
Save herestomwiththeweather/717686 to your computer and use it in GitHub Desktop.
RSpec and CanCan Authorization for Intentional Economics
def authorized?(amount)
credit_limit.nil? or (amount <= balance + credit_limit)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment