0
0
Fork 0

Add embed_url to preview cards (#5775)

This commit is contained in:
Akihiko Odaki 2017-12-07 11:37:43 +09:00 committed by Eugen Rochko
parent 432761f375
commit c083816c24
7 changed files with 38 additions and 9 deletions

View file

@ -6,7 +6,7 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer
attributes :url, :title, :description, :type,
:author_name, :author_url, :provider_name,
:provider_url, :html, :width, :height,
:image
:image, :embed_url
def image
object.image? ? full_asset_url(object.image.url(:original)) : nil