diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7dfd404b69..c5eb745c05 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -20,6 +20,11 @@ class ApplicationController < ActionController::Base private + def action + params[:action].to_sym + end + + def require_distributor_chosen unless @distributor = current_distributor redirect_to spree.root_path diff --git a/app/controllers/base_controller.rb b/app/controllers/base_controller.rb index a3b645d522..36084c0225 100644 --- a/app/controllers/base_controller.rb +++ b/app/controllers/base_controller.rb @@ -3,7 +3,11 @@ require 'open_food_network/tag_rule_applicator' class BaseController < ApplicationController include Spree::Core::ControllerHelpers + include Spree::Core::ControllerHelpers::Auth + include Spree::Core::ControllerHelpers::Common + include Spree::Core::ControllerHelpers::Order include Spree::Core::ControllerHelpers::RespondWith + include EnterprisesHelper include OrderCyclesHelper