Hi all
I’m using RESTful routes combined with the to_csv plugin and would like to know if there’s a nicer way of generating a link to fetch the CSV file than just making a hard link. This is what I use for the moment (and it works btw):
<%= link_to(“Export as CSV”,“/companies.csv”) -%>
I would expect the link helper to have something like
<%= link_to(“Export as CSV”,companies_url(:type => :csv) -%>
but haven’t found anything in the rails docs to generate the URL in this way.
Best regards
Peter De Berdt