Method: Stall::Models::ProductList::ClassMethods#wizard

Defined in:
app/models/stall/models/product_list.rb

#wizardObject



133
134
135
136
137
138
139
140
141
142
143
# File 'app/models/stall/models/product_list.rb', line 133

def wizard
  wizard_name = Stall.config.default_checkout_wizard

  if (wizard = Stall::Utils.try_load_constant(wizard_name))
    wizard
  else
    raise Stall::Checkout::WizardNotFoundError.new,
      "The checkout wizard #{ wizard_name } was not found. You must generate it " +
      "with `rails g stall:wizard #{ wizard_name.underscore.gsub('_checkout_wizard', '') }`"
  end
end