From 48b9619439818ecb344ae33c9c31a55ecb1aa27a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 5 Nov 2016 15:20:05 +0100 Subject: Adding hashtags --- app/helpers/atom_builder_helper.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/helpers/atom_builder_helper.rb') diff --git a/app/helpers/atom_builder_helper.rb b/app/helpers/atom_builder_helper.rb index c7131074d..2eed2da65 100644 --- a/app/helpers/atom_builder_helper.rb +++ b/app/helpers/atom_builder_helper.rb @@ -47,6 +47,10 @@ module AtomBuilderHelper xml.author(&block) end + def category(xml, tag) + xml.category(term: tag.name) + end + def target(xml, &block) xml['activity'].object(&block) end @@ -186,6 +190,10 @@ module AtomBuilderHelper stream_entry.target.media_attachments.each do |media| link_enclosure xml, media end + + stream_entry.target.tags.each do |tag| + category xml, tag + end end end end @@ -198,6 +206,10 @@ module AtomBuilderHelper stream_entry.activity.media_attachments.each do |media| link_enclosure xml, media end + + stream_entry.activity.tags.each do |tag| + category xml, tag + end end end -- cgit