diff options
Diffstat (limited to 'app/views/rss')
| -rw-r--r-- | app/views/rss/updates.xml.builder | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder new file mode 100644 index 0000000..541ad4e --- /dev/null +++ b/app/views/rss/updates.xml.builder | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | xml.instruct! | ||
| 2 | xml.feed(:xmlns => "http://www.w3.org/2005/Atom") do | ||
| 3 | xml.title("Chaos Computer Club Updates") | ||
| 4 | xml.link(:href => "http://www.ccc.de/") | ||
| 5 | xml.updated(@items.first.published_at) | ||
| 6 | xml.author("Chaos Computer Club e.V.") | ||
| 7 | xml.id("http://www.ccc.de/") | ||
| 8 | |||
| 9 | @items.each do |item| | ||
| 10 | xml.entry do | ||
| 11 | xml.title(item.title) | ||
| 12 | port = (request.port != 80) ? port = ":#{request.port}" : "" | ||
| 13 | xml.link(request.protocol + request.host + port + item.public_link) | ||
| 14 | xml.id(request.protocol + request.host + port + item.public_link) | ||
| 15 | xml.updated(item.updated_at) | ||
| 16 | xml.content(:type => "xhtml") do | ||
| 17 | xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") | ||
| 18 | end | ||
| 19 | end | ||
| 20 | |||
| 21 | end | ||
| 22 | |||
| 23 | end \ No newline at end of file | ||
