Module: ActsAsPurchasableWizard::Base

Defined in:
app/models/concerns/acts_as_purchasable_wizard.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_purchasable_wizardObject



8
9
10
11
12
13
14
15
16
17
# File 'app/models/concerns/acts_as_purchasable_wizard.rb', line 8

def acts_as_purchasable_wizard
  raise('please declare acts_as_wizard first') unless respond_to?(:acts_as_wizard?)
  raise('please declare acts_as_purchasable_parent first') unless respond_to?(:acts_as_purchasable_parent?)

  unless (const_get(:WIZARD_STEPS).keys & [:billing, :checkout, :submitted]).length == 3
    raise('please include a :billing, :checkout and :submitted step')
  end

  include ::ActsAsPurchasableWizard
end