Added atom feed to forums.
This commit was merged in pull request #48.
This commit is contained in:
19
app/views/forums/show.atom.builder
Normal file
19
app/views/forums/show.atom.builder
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
atom_feed do |feed|
|
||||||
|
feed.title "Latest threads in " + @forum.name
|
||||||
|
feed.updated Time.now
|
||||||
|
|
||||||
|
@threads.limit(100).each do |thread|
|
||||||
|
unless thread.sticky?
|
||||||
|
feed.entry thread do |entry|
|
||||||
|
entry.updated thread.updated_at
|
||||||
|
entry.author do |a|
|
||||||
|
a.name thread.author.name
|
||||||
|
a.uri user_url(thread.author)
|
||||||
|
end
|
||||||
|
entry.url forumthread_url(thread)
|
||||||
|
entry.title thread.title
|
||||||
|
entry.content render_md(thread.content).html_safe, :type => 'html'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user