1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-28 13:39:18 +09:00
YuruToot/app/services/concerns/stream_entry_renderer.rb

9 lines
348 B
Ruby
Raw Normal View History

2017-02-11 10:12:05 +09:00
# frozen_string_literal: true
module StreamEntryRenderer
def stream_entry_to_xml(stream_entry)
renderer = StreamEntriesController.renderer.new(method: 'get', http_host: Rails.configuration.x.local_domain, https: Rails.configuration.x.use_https)
renderer.render(:show, assigns: { stream_entry: stream_entry }, formats: [:atom])
end
end