fix error

This commit is contained in:
chiu 2020-05-28 15:33:56 +08:00
parent bb5e98c6b1
commit 212530361b
1 changed files with 3 additions and 3 deletions

View File

@ -143,9 +143,9 @@ class AnnouncementsController < ApplicationController
end end
else else
if devide_flag if devide_flag
anns = sorted_anns.sample(widget_data_count).map{|v| data_to_human_type(v)} anns = sorted_anns.sample(widget_data_count)
top_anns = anns.select{|v| v.is_top} top_anns = anns.select{|v| v.is_top}.map{|v| data_to_human_type(v)}
not_top_anns = anns.select{|v| !v.is_top} not_top_anns = anns.select{|v| !v.is_top}.map{|v| data_to_human_type(v)}
else else
anns = sorted_anns.sample(widget_data_count).map{|v| data_to_human_type(v)} anns = sorted_anns.sample(widget_data_count).map{|v| data_to_human_type(v)}
end end