How do I force XML output with RABL? It renders JSON as default, which works fine. When I access my page with
curl -H "Accept: application/xml" -X GET (myurl)
RABL renders XML as expected. However, when I access the same URL with a browser, the response is in JSON. I tried setting
ActionView::Template::Handlers::Rabl.default_format = Mime::XML
as well as
render "index.rabl", :content_type => 'application/xml'
In that case, rails returns application/xml as content type but still returns JSON.
How can I render the XML representation of my data without sending application/xmlas the only accept header?