From 3feb7b5dd6fe055310b151ec1aaf1380b138b278 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 16 Sep 2021 17:51:48 +0800 Subject: [PATCH] fix error --- app/models/event_news_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/event_news_file.rb b/app/models/event_news_file.rb index a86abda..aa8a58c 100644 --- a/app/models/event_news_file.rb +++ b/app/models/event_news_file.rb @@ -16,7 +16,7 @@ class EventNewsFile end def to_fronted(locale=I18n.locale) file = self - (file.enabled_for?(locale) && !file[:file].blank?) ? { "file_url" => "/xhr/announcements/file/#{file.id}/#{file['file']}" + "\" title=\"#{file.file_title}", + (file.enabled_for?(locale) && !file[:file].blank?) ? { "file_url" => "/xhr/event_news/file/#{file.id}/#{file['file']}" + "\" title=\"#{file.file_title}", "file_title" => (file.title.blank? ? URI.unescape(File.basename(file.file.path)) : file.title rescue '') } : nil rescue nil end