Here is the parent question: save string to file I want to pass the parameter which will be saved in file(.csv) after clicking button.
@bigtable is a table with strings
I've found a solution - to not write double post here is the link to the topic with the answer: saving variable to file and downloading it
Use <%= form_tag(url, :remote => true) do %>
to make the call with Ajax, so your page will not be redirected. Use your server logs to see if the request is executed (if you want to get the result of the ajax call in your page, look at http://www.alfajango.com/blog/rails-3-remote-links-and-forms/).