Archived
2
0
Fork 0

Replace OEmbed and initial state Rabl templates with serializers (#4110)

* Replace OEmbed Rabl template with serializer

* Replace initial state rabl with serializer
This commit is contained in:
Eugen Rochko 2017-07-08 14:51:05 +02:00 committed by GitHub
parent 102466ac58
commit 864e3f8d9c
9 changed files with 121 additions and 94 deletions

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
object @stream_entry
node(:type) { 'rich' }
node(:version) { '1.0' }
node(:title, &:title)
node(:author_name) { |entry| entry.account.display_name.blank? ? entry.account.username : entry.account.display_name }
node(:author_url) { |entry| account_url(entry.account) }
node(:provider_name) { site_hostname }
node(:provider_url) { root_url }
node(:cache_age) { 86_400 }
node(:html) { |entry| "<iframe src=\"#{embed_account_stream_entry_url(entry.account, entry)}\" style=\"width: 100%; overflow: hidden\" frameborder=\"0\" width=\"#{@width}\" height=\"#{@height}\" scrolling=\"no\"></iframe>" }
node(:width) { @width }
node(:height) { @height }