Module: PaidUp::Mixins::Subscriber
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/paid_up/mixins/subscriber.rb
Overview
Subscriber Mixin
Defined Under Namespace
Modules: InstanceMethods
Instance Method Summary collapse
Instance Method Details
#subscriber ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/paid_up/mixins/subscriber.rb', line 9 def subscriber features = PaidUp::Feature.find_all_by_setting_type('table_rows') features.each do |feature| has_many feature.slug.to_sym end delegate :plan, to: :paid_up_subscription after_initialize :set_default_attributes, :load_stripe_data after_save :load_stripe_data before_save :remove_anonymous_association before_destroy do |record| next if record.stripe_data.respond_to? :deleted record.stripe_data.delete end include InstanceMethods end |