mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Test selecting distributor when adding item to cart, for no/remote distributor selected
This commit is contained in:
@@ -4,15 +4,8 @@ Spree::ProductsController.class_eval do
|
||||
include Spree::DistributorsHelper
|
||||
include OpenFoodWeb::SplitProductsByDistributor
|
||||
|
||||
before_filter :load_distributors, :only => :show
|
||||
|
||||
respond_override :index => { :html => { :success => lambda {
|
||||
@products, @products_local, @products_remote = split_products_by_distributor @products, current_distributor
|
||||
} } }
|
||||
|
||||
|
||||
def load_distributors
|
||||
@distributors = Spree::Distributor.by_name
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user