OSDN Git Service

t#32046:
[pettanr/pettanr.git] / app / views / comics / show.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   @comic.stories.each do |story|
13     feed.entry(
14       story.panel,
15       :url => panel_url(story.panel),
16       :id => panel_url(story.panel),
17       :published => story.panel.updated_at,
18       :updated => story.panel.updated_at
19     ) do |item|
20       item.title(story.panel.caption)
21       item.content(story.panel.scenario, :type => 'html')
22       item.author {|author| author.name(story.panel.author.name)}
23     end
24   end
25 end