X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=blobdiff_plain;f=app%2Fviews%2Fscrolls%2Fshow.atom.builder;fp=app%2Fviews%2Fscrolls%2Fshow.atom.builder;h=6f5c967fc33a49ba3424295fdfb7ad38d362c187;hp=0000000000000000000000000000000000000000;hb=6f2a183413df55de274cf896a0b54fceb6be00bf;hpb=4113abdecb6e8b5df5a1a1448741c10e20e66620 diff --git a/app/views/scrolls/show.atom.builder b/app/views/scrolls/show.atom.builder new file mode 100644 index 00000000..6f5c967f --- /dev/null +++ b/app/views/scrolls/show.atom.builder @@ -0,0 +1,25 @@ +atom_feed( + :language => 'ja-JP', + :root_url => root_url, + :url => root_url(:format => :atom), + :id => root_url +) do |feed| + feed.title MagicNumber['profile']['users']['caption'] + feed.subtitle sanitize(MagicNumber['profile']['users']['description'], :tags => %w(a p img br)) + feed.updated Time.now + feed.author {|author| author.name(MagicNumber['profile']['web_master'])} + + @comic.stories.each do |story| + feed.entry( + story.panel, + :url => panel_url(story.panel), + :id => panel_url(story.panel), + :published => story.panel.updated_at, + :updated => story.panel.updated_at + ) do |item| + item.title(story.panel.caption) + item.content(story.panel.scenario, :type => 'html') + item.author {|author| author.name(story.panel.author.name)} + end + end +end