add img_src for front-end
This commit is contained in:
parent
c3c8e4864b
commit
810c283dc6
|
@ -347,6 +347,7 @@ class AnnouncementsController < ApplicationController
|
||||||
"updated_at" => announcement.postdate.strftime('%Y-%m-%d %H:%M'),
|
"updated_at" => announcement.postdate.strftime('%Y-%m-%d %H:%M'),
|
||||||
"body" =>announcement.text,
|
"body" =>announcement.text,
|
||||||
"image" => announcement.image.url,
|
"image" => announcement.image.url,
|
||||||
|
"img_src" => announcement.image.thumb.url || "/assets/announcement-default.jpg",
|
||||||
"alt_title" => desc
|
"alt_title" => desc
|
||||||
},
|
},
|
||||||
"impressionist" => (announcement.is_preview ? nil : announcement),
|
"impressionist" => (announcement.is_preview ? nil : announcement),
|
||||||
|
|
Loading…
Reference in New Issue