viewで.rhtmlの代わりに.rxmlを使うだけ。サンプルは「Rails Cookbook」より。一部変更している箇所にはコメントを入れています。 まずは、app/controllers/xml_controller.rb。普通に作ります。 class XmlController < ApplicationController def rss @feed_title = "O'Reilly Books" @books = Book.find(:all, :order => "est_release_date desc", :limit => 2) # app/view/layout/application.rhtmlがあるとまずいので render :layout => false end end 次に、app/views/xml/rss.rxml。拡張子が.rhtmlではなく、.rx
![RailsでRSSフィードを配信するのは超簡単! - このブログは証明できない。](https://cdn-ak-scissors.b.st-hatena.com/image/square/7b4fbf5d0257da5d806dffbe57ba9066eda52990/height=288;version=1;width=512/https%3A%2F%2Fimages-fe.ssl-images-amazon.com%2Fimages%2FI%2F51EedJKQgHL._SL160_.jpg)