Skip to content

Instantly share code, notes, and snippets.

@gavingmiller
Created September 19, 2013 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gavingmiller/6627634 to your computer and use it in GitHub Desktop.
Save gavingmiller/6627634 to your computer and use it in GitHub Desktop.
def payment_required?(exception)
follow_limit_reached? && payable_exception?(exception)
end
# Did the exception occur due to a follow action on a Well?
# Otherwise, exception is 401, not 402.
def payable_exception?(exception)
exception.action == :follow && exception.subject.kind_of?(Well)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment