Skip to main content

Add Download Button to csv-export

General • Asked by Sascha M.

Hi,
I did everything (and it's working!) regarding this episode:
https://gorails.com/episodes/export-to-csv?autoplay=1

How can I add a download-button in my views for that?

Thank you guys!


Hi,

You can use something like...

<%= link_to "View CSV", resource_path(@resource, format: :csv) %>


thx Jamie, that worked well!


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.