diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index 54feee3802..3ec78c85d4 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -4,6 +4,7 @@ require "spree/core/controller_helpers/ssl" module Api class BaseController < ActionController::Metal + include RawParams include ActionController::StrongParameters include ActionController::RespondWith include Spree::Api::ControllerSetup diff --git a/app/controllers/api/taxons_controller.rb b/app/controllers/api/taxons_controller.rb index a70677b857..491cf75954 100644 --- a/app/controllers/api/taxons_controller.rb +++ b/app/controllers/api/taxons_controller.rb @@ -8,9 +8,9 @@ module Api @taxons = if taxonomy taxonomy.root.children elsif params[:ids] - Spree::Taxon.where(id: params[:ids].split(",")) + Spree::Taxon.where(id: raw_params[:ids].split(",")) else - Spree::Taxon.ransack(params[:q]).result + Spree::Taxon.ransack(raw_params[:q]).result end render json: @taxons, each_serializer: Api::TaxonSerializer end