add img_src for front-end

This commit is contained in:
EricTYL 2019-10-29 15:48:05 +08:00
parent c3c8e4864b
commit 810c283dc6
1 changed files with 1 additions and 0 deletions

View File

@ -347,6 +347,7 @@ class AnnouncementsController < ApplicationController
"updated_at" => announcement.postdate.strftime('%Y-%m-%d %H:%M'),
"body" =>announcement.text,
"image" => announcement.image.url,
"img_src" => announcement.image.thumb.url || "/assets/announcement-default.jpg",
"alt_title" => desc
},
"impressionist" => (announcement.is_preview ? nil : announcement),