diff --git a/app/controllers/enterprises_controller.rb b/app/controllers/enterprises_controller.rb index 4f244bf49f..d8b33e4ad6 100644 --- a/app/controllers/enterprises_controller.rb +++ b/app/controllers/enterprises_controller.rb @@ -2,9 +2,6 @@ class EnterprisesController < BaseController layout "darkswarm" helper Spree::ProductsHelper include OrderCyclesHelper - before_filter :require_distributor_chosen - before_filter :set_order_cycles, only: :shop - before_filter :load_active_distributors, only: :shop before_filter :clean_permalink, only: :check_permalink respond_to :js, only: :permalink_checker @@ -73,6 +70,10 @@ class EnterprisesController < BaseController order_cycle_options = OrderCycle.active.with_distributor(distributor) order.order_cycle = order_cycle_options.first if order_cycle_options.count == 1 order.save! + + require_distributor_chosen + set_order_cycles + load_active_distributors end def check_permalink