From f0f7bba75f94c9b31fa12f791428af19f0625fd0 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 12 Sep 2019 15:21:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixun_lists_controller.rb | 2 +- app/services/shixun_search_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixun_lists_controller.rb b/app/controllers/shixun_lists_controller.rb index a39a6b34f..e92e857ad 100644 --- a/app/controllers/shixun_lists_controller.rb +++ b/app/controllers/shixun_lists_controller.rb @@ -5,6 +5,6 @@ class ShixunListsController < ApplicationController private def search_params - params.permit(:keyword, :type, :page, :per_page, :order, :type, :status, :diff) + params.permit(:keyword, :type, :page, :limit, :order, :type, :status, :diff) end end \ No newline at end of file diff --git a/app/services/shixun_search_service.rb b/app/services/shixun_search_service.rb index 820919dd1..911f341f8 100644 --- a/app/services/shixun_search_service.rb +++ b/app/services/shixun_search_service.rb @@ -42,7 +42,7 @@ class ShixunSearchService < ApplicationService def search_options model_options = { - includes: Shixun.searchable_includes + includes: [ :shixun_info, :challenges, :subjects, user: { user_extension: :school } ] } model_options.merge!(where: { id: @shixuns.pluck(:id) }) model_options.merge!(order: {"myshixuns_count" => sort_str})