0
0
Fork 0

Adding hashtags

This commit is contained in:
Eugen Rochko 2016-11-05 15:20:05 +01:00
parent 62292797ec
commit 48b9619439
33 changed files with 305 additions and 62 deletions

View file

@ -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