Sha256: c8744dd71164380e5699691388746f96270518580ae90544586432a7e5212222

Contents?: true

Size: 954 Bytes

Versions: 73

Compression:

Stored size: 954 Bytes

Contents

xml.instruct!

xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do

  xml.title   "Feed Name"
  xml.link    "rel" => "self", "href" => user_blogs_path(@user, :only_path=>false, :format=>:xml)
  # xml.link    "rel" => "alternate", "href" => url_for(:only_path => false, :controller => 'posts')
  xml.id      user_blogs_path(@user, :only_path => false)
  xml.updated @blogs.first.updated_at.strftime "%Y-%m-%dT%H:%M:%SZ" if @blogs.any?
  xml.author  { xml.name @blogs.first }

  @blogs.each do |post|
    xml.entry do
      xml.title   post.title
      xml.link    "rel" => "alternate", "href" => user_blogs_path(@user, post, :only_path => false)
      xml.id      user_blog_path(@user, post, :only_path => false)
      xml.updated post.updated_at.strftime "%Y-%m-%dT%H:%M:%SZ"
      xml.author  { xml.name post.user.email }
      xml.summary "Post summary"
      xml.content "type" => "html" do
        xml.cdata! post.body
      end
    end
  end

end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
wheels-0.1.30 app/views/blogs/index.xml.builder
wheels-0.1.28 app/views/blogs/index.xml.builder
wheels-0.1.27 app/views/blogs/index.xml.builder
wheels-0.1.25 app/views/blogs/index.xml.builder
wheels-0.1.24 app/views/blogs/index.xml.builder
wheels-0.1.23 app/views/blogs/index.xml.builder
wheels-0.1.22 app/views/blogs/index.xml.builder
wheels-0.1.21 app/views/blogs/index.xml.builder
wheels-0.1.20 app/views/blogs/index.xml.builder
wheels-0.1.19 app/views/blogs/index.xml.builder
wheels-0.1.18 app/views/blogs/index.xml.builder
wheels-0.1.17 app/views/blogs/index.xml.builder
wheels-0.1.16 app/views/blogs/index.xml.builder
wheels-0.1.15 app/views/blogs/index.xml.builder
wheels-0.1.14 app/views/blogs/index.xml.builder
wheels-0.1.13 app/views/blogs/index.xml.builder
wheels-0.1.12 app/views/blogs/index.xml.builder
wheels-0.1.10 app/views/blogs/index.xml.builder
wheels-0.1.9 app/views/blogs/index.xml.builder
wheels-0.1.8 app/views/blogs/index.xml.builder