views:

40

answers:

1

I'm trying to create a view with a download link to download the html source?

+2  A: 

You can use render_to_string instead of render, which will give you the page, then to download it use send_data.

More on render to string here, and more on send_data here.

Peter
Thanks, I've seen that in other searches, but have trouble using it. Do you have any examples?