OSDN Git Service

t#32046:
[pettanr/pettanr.git] / app / views / comics / index.atom.builder
1 atom_feed(
2   :language => 'ja-JP',
3   :root_url => root_url,
4   :url => root_url(:format => :atom),
5   :id => root_url
6 ) do |feed|
7   feed.title MagicNumber['profile']['users']['caption']
8   feed.subtitle sanitize(MagicNumber['profile']['users']['description'], :tags => %w(a p img br))
9   feed.updated Time.now
10   feed.author {|author| author.name(MagicNumber['profile']['web_master'])}
11
12   @comics.each do |comic|
13     feed.entry(
14       comic,
15       :url => comic_url(comic),
16       :id => comic_url(comic),
17       :published => comic.updated_at,
18       :updated => comic.updated_at
19     ) do |item|
20       item.title(comic.title)
21       item.content(comic.description, :type => 'html')
22       item.author {|author| author.name(comic.author.name)}
23     end
24   end
25 end