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})