diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index e429be1..7e390db 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -129,7 +129,7 @@ class AnnouncementsController < ApplicationController if anns_cache.count > 1 anns_cache.destroy end - AnnsCache.create(parent_id: subpart.id,locale: I18n.locale.to_s,filter_result: sorted_anns.map{|v| v.id}) + AnnsCache.create(parent_id: subpart.id,locale: I18n.locale.to_s,filter_result: sorted_anns.pluck(:id)) else sorted_anns = sorted_anns.sample(widget_data_count) end