From 261ed751cb851afe3b61a7cb8fae4e11942bf3a0 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 30 Dec 2020 12:55:02 +0000 Subject: [PATCH] Remove explicit `content_type` declarations in `Api::OrderCyclesController` This should be handled in `Api::BaseController` --- app/controllers/api/order_cycles_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/order_cycles_controller.rb b/app/controllers/api/order_cycles_controller.rb index ddc7b15fa5..bc1bba3d5a 100644 --- a/app/controllers/api/order_cycles_controller.rb +++ b/app/controllers/api/order_cycles_controller.rb @@ -20,7 +20,7 @@ module Api search_params ).products_json - render plain: products, content_type: "application/json" + render plain: products rescue ProductsRenderer::NoProducts render_no_products end @@ -33,13 +33,13 @@ module Api render plain: ActiveModel::ArraySerializer.new( taxons, each_serializer: Api::TaxonSerializer - ).to_json, content_type: "application/json" + ).to_json end def properties render plain: ActiveModel::ArraySerializer.new( product_properties | producer_properties, each_serializer: Api::PropertySerializer - ).to_json, content_type: "application/json" + ).to_json end private