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.
<%= link_to "Retrieve as XML", products_path(:format => 'xml') %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With