Module: PaidUp::Mixins::PaidFor

Extended by:
ActiveSupport::Concern
Defined in:
lib/paid_up/mixins/paid_for.rb

Overview

PaidFor Mixin

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Instance Method Summary collapse

Instance Method Details



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/paid_up/mixins/paid_for.rb', line 15

def paid_for(options = {})
  cattr_accessor :paid_for_scope_symbol # Creates class-level instance var

  extend ClassMethods
  include InstanceMethods

  self.paid_for_scope_symbol = options.fetch(:scope, :all)

  validate_feature
  associations
end