Reputation: 11016
Here's my current hack:
<%= link_to "Retrieve as XML", products_path + ".xml" %>
...which works just fine, but is obviously quite ugly.
What is the proper way?
I searched the docs for an answer - no luck. Some old forum posts suggest there is (or was) a format
option, but it seems this is no longer available.
Upvotes: 4
Views: 753
Reputation: 15634
<%= link_to "Retrieve as XML", products_path(:format => 'xml') %>
Upvotes: 8