remote files fixed

This commit is contained in:
Harry Bomrah 2016-04-12 15:56:29 +08:00
parent 4733a77afa
commit 99b8776c27
1 changed files with 7 additions and 3 deletions

View File

@ -101,6 +101,10 @@ class AnnouncementsController < ApplicationController
"status" => "<a href='#{fa["source-site"]}' target='_blank' class='feed-source'>#{fa["source-site-title"]}</a>",
"status-class" => "status-source"
}
files = fa["bulletin_files"].collect{|bf| { "file_url" => bf["url"], "file_title" => (fa["title_translations"][locale].blank? ? fa["url"] : fa["title_translations"][locale] rescue '') }} rescue []
links = fa["bulletin_links"].map{|link| { "link_url" => link["url"], "link_title" => (link["title_translations"][locale].blank? ? link["url"] : link["title_translations"][locale]) } } rescue []
x = {
"bulletin_links" => fa["bulletin_links"],
"bulletin_files" => fa["bulletin_files"],