Created
September 19, 2013 18:19
-
-
Save gavingmiller/6627634 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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