diff --git a/app/controllers/shixun_lists_controller.rb b/app/controllers/shixun_lists_controller.rb index ece1d0be5..c77da46e0 100644 --- a/app/controllers/shixun_lists_controller.rb +++ b/app/controllers/shixun_lists_controller.rb @@ -1,7 +1,6 @@ class ShixunListsController < ApplicationController def index @results = ShixunSearchService.call(search_params, current_laboratory) - Rails.logger.info("########results: #{@results.includes(:subjects)}") end private diff --git a/app/views/shixun_lists/index.json.jbuilder b/app/views/shixun_lists/index.json.jbuilder index 094c2160b..2507be68d 100644 --- a/app/views/shixun_lists/index.json.jbuilder +++ b/app/views/shixun_lists/index.json.jbuilder @@ -21,10 +21,10 @@ json.shixun_list do json.pic url_to_avatar(obj) json.content highlights json.level level_to_s(obj.trainee) - if params[:sort] != "wechat_myshixuns_count" - json.subjects obj.subjects.visible.unhidden.uniq do |subject| + #if params[:sort] != "wechat_myshixuns_count" + json.subjects obj.subjects.select{ |s| s.status == 2 && s.hidden == 0} do |subject| json.(subject, :id, :name) end - end + #end end end \ No newline at end of file