From 9a61ad3e9d6db68f1177bdf8420193d1f54662b1 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 12 Sep 2019 14:53:44 +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/views/shixun_lists/index.json.jbuilder | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/shixun_lists/index.json.jbuilder b/app/views/shixun_lists/index.json.jbuilder index 526fcaab9..83437af77 100644 --- a/app/views/shixun_lists/index.json.jbuilder +++ b/app/views/shixun_lists/index.json.jbuilder @@ -2,7 +2,6 @@ json.shixuns_count @results.total_count json.shixun_list do json.array! @results.with_highlights(multiple: true) do |obj, highlights| - puts obj json.merge! obj.to_searchable_json json.challenge_names obj.challenges.pluck(:subject) @@ -12,7 +11,7 @@ json.shixun_list do highlights[:content]&.first&.sub!(reg, '') json.title highlights.delete(:name)&.join('...') || obj.searchable_title - json.description highlights[:description]&.join('...') || obj.description + json.description highlights[:description]&.join('...') || Util.extract_content(obj.description)[0..Searchable::MAXIMUM_LENGTH] json.content highlights json.level level_to_s(obj.trainee)