render_without_layout
layoutを使うcontrollerがあって、そのなかでrespond_toでxmlのレスポンスを返したい。でもその時はlayoutを使いたくない。こんな感じになる。
def index @products = Product.find_products_for_sale respond_to do |format| format.html format.xml { render_without_layout :file => "app/views/store/index.rxml", :use_full_path => false } end end