Atom template Rails builder template
Ruby posted 10 months ago by christian
1 atom_feed(:url => formatted_posts_url(:atom)) do |feed| 2 feed.title(@category.name) 3 feed.updated(@posts.first ? @posts.first.created_at : Time.now.utc) 4 5 for post in @posts 6 feed.entry(post) do |entry| 7 entry.title(post.title) 8 entry.content(post.body_html, :type => 'html') 9 entry.updated post.updated_at 10 11 for tag in post.tags 12 entry.category :term => url_for(tag), :label => tag.name 13 end 14 end 15 end 16 end