diff --git a/app/controllers/api/v1/customers_controller.rb b/app/controllers/api/v1/customers_controller.rb index f1fcdddbf3..24bd1db8ee 100644 --- a/app/controllers/api/v1/customers_controller.rb +++ b/app/controllers/api/v1/customers_controller.rb @@ -61,7 +61,7 @@ module Api def search_customers customers = visible_customers.includes(:bill_address, :ship_address) customers = customers.where(enterprise_id: params[:enterprise_id]) if params[:enterprise_id] - customers.ransack(params[:q]).result + customers.ransack(params[:q]).result.order(:id) end def visible_customers