Using rails 2. I want a link to the current page (whatever it is) that keeps all of the params the same but changes the format to \'csv\'. (setting the format can be done b
You can use:
link_to "text of link", your_controller_path(format:'csv',params: request.query_parameters)