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.7 app/views/blogs/index.xml.builder
wheels-0.1.6 app/views/blogs/index.xml.builder
wheels-0.1.5 app/views/blogs/index.xml.builder
wheels-0.1.4 app/views/blogs/index.xml.builder
wheels-0.1.3 app/views/blogs/index.xml.builder
wheels-0.1.2 app/views/blogs/index.xml.builder
wheels-0.1.1 app/views/blogs/index.xml.builder
wheels-0.1.0 app/views/blogs/index.xml.builder
wheels-0.0.49 app/views/blogs/index.xml.builder
wheels-0.0.48 app/views/blogs/index.xml.builder
wheels-0.0.47 app/views/blogs/index.xml.builder
wheels-0.0.46 app/views/blogs/index.xml.builder
wheels-0.0.45 app/views/blogs/index.xml.builder
wheels-0.0.44 app/views/blogs/index.xml.builder
wheels-0.0.43 app/views/blogs/index.xml.builder
wheels-0.0.42 app/views/blogs/index.xml.builder
wheels-0.0.41 app/views/blogs/index.xml.builder
wheels-0.0.40 app/views/blogs/index.xml.builder
wheels-0.0.39 app/views/blogs/index.xml.builder
wheels-0.0.38 app/views/blogs/index.xml.builder