mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
19 lines
585 B
Ruby
19 lines
585 B
Ruby
class BaseController < ApplicationController
|
|
include Spree::Core::ControllerHelpers
|
|
include Spree::Core::ControllerHelpers::RespondWith
|
|
include EnterprisesHelper
|
|
include OrderCyclesHelper
|
|
|
|
helper 'spree/base'
|
|
|
|
# Spree::Core::ControllerHelpers declares helper_method get_taxonomies, so we need to
|
|
# include Spree::ProductsHelper so that method is available on the controller
|
|
include Spree::ProductsHelper
|
|
|
|
before_filter :check_order_cycle_expiry
|
|
|
|
def load_active_distributors
|
|
@active_distributors ||= Enterprise.distributors_with_active_order_cycles
|
|
end
|
|
end
|