about summary refs log tree commit diff
path: root/app/services/concerns/stream_entry_renderer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/concerns/stream_entry_renderer.rb')
-rw-r--r--app/services/concerns/stream_entry_renderer.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/concerns/stream_entry_renderer.rb b/app/services/concerns/stream_entry_renderer.rb
new file mode 100644
index 000000000..a4255daea
--- /dev/null
+++ b/app/services/concerns/stream_entry_renderer.rb
@@ -0,0 +1,8 @@
+# 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