Module: SubscriptionFu::Models::ClassMethods
- Defined in:
- lib/subscription_fu/models.rb
Instance Method Summary collapse
Instance Method Details
#needs_subscription ⇒ Object
8 9 10 11 12 13 |
# File 'lib/subscription_fu/models.rb', line 8 def needs_subscription send(:include, InstanceMethods) has_many :subscriptions, :class_name => "SubscriptionFu::Subscription", :as => :subject, :dependent => :destroy delegate :plan, :sponsored?, :canceled?, :prefix => :subscription, :to => :active_subscription, :allow_nil => true delegate :plan, :prefix => :upcoming_subscription, :to => :upcoming_subscription, :allow_nil => true end |