Created
January 31, 2012 18:10
-
-
Save jzellman/1711948 to your computer and use it in GitHub Desktop.
Var Args 6
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
class User < ActiveRecord::Base | |
# A user is active during a period if it has any subscriptions that | |
#are active during that period | |
def active?(start_date, end_date) | |
subscriptions.active_in_period(start_date, end_date).any? | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment