What is the correct way to handle custom XML responses in Rails 3.1?
In Rails 2, I had the following action in the controller:
And then the RXML constructor template in the feed.rxml view:
xml.instruct! :xml, :version=>"1.0" xml.rss(:version=>"2.0") { xml.channel { xml.title(@blog.title) xml.link(url_for(:only_path => false)) xml.description(@blog.subtitle) xml.language('en-us') for blog_post in @blog_posts xml.item do xml.title(blog_post.title || '') xml.link(blog_named_link(blog_post)) xml.description(blog_post.body) xml.tag(blog_post.tag_string) xml.posted_by(blog_post.posted_by.name) end end } }
Rails 3.1 has excluded the RXML template handler, but I cannot find documentation about what we should replace.
source share