From c1c3db88a854b9c67c320b2341470171f88a8863 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 12 Sep 2019 10:22:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=80=89=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/shixun_list.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shixuns/shixun_list.json.jbuilder b/app/views/shixuns/shixun_list.json.jbuilder index 54ac65a0a..2f1d4905c 100644 --- a/app/views/shixuns/shixun_list.json.jbuilder +++ b/app/views/shixuns/shixun_list.json.jbuilder @@ -10,7 +10,7 @@ json.shixun_list do # json.description highlights.values[0,5].each { |arr| arr.is_a?(Array) ? arr.join('...') : arr }.join('
') json.content highlights json.level level_to_s(obj.trainee) - json.subjects obj.subjects do |subject| + json.subjects obj.subjects.uniq do |subject| json.(subject, :id, :name) end end