From 4dff3fe79cabd00ef8cffb2e4b90f1ef77595876 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Thu, 19 Mar 2015 17:05:47 +1100 Subject: [PATCH] Removing unused distributable action from products api --- .../spree/api/products_controller_decorator.rb | 9 --------- config/routes.rb | 1 - 2 files changed, 10 deletions(-) diff --git a/app/controllers/spree/api/products_controller_decorator.rb b/app/controllers/spree/api/products_controller_decorator.rb index af7834bb04..0186c6e8df 100644 --- a/app/controllers/spree/api/products_controller_decorator.rb +++ b/app/controllers/spree/api/products_controller_decorator.rb @@ -20,15 +20,6 @@ Spree::Api::ProductsController.class_eval do render_paged_products @products end - def distributable - producers = OpenFoodNetwork::Permissions.new(current_api_user). - order_cycle_enterprises.is_primary_producer.by_name - - @products = paged_products_for_producers producers - - render_paged_products @products - end - def overridable producers = OpenFoodNetwork::Permissions.new(current_api_user). variant_override_producers.by_name diff --git a/config/routes.rb b/config/routes.rb index 517d78e602..a7fe216d64 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -144,7 +144,6 @@ Spree::Core::Engine.routes.prepend do collection do get :managed get :bulk_products - get :distributable get :overridable end delete :soft_delete