rails send_data only works 'inline' not download -
in controller have:
send_data(data, filename: "payment_file") in view have:
<%= link_to 'download file', bank_file_download_path(@bank_file_job), data: {no_turbolink: true}, class: "btn btn-primary btn-lg btn-block" %> but shows content of file inline. please me?
i figured out. pointed out in another answer turbolinks need disabled. suggested solution in answer didn't work because syntax disabling on specific page has changed turbolinks 5.0 onwards. should this.
<%= link_to 'download file', file_download_path , data: {turbolinks: false} %>
Comments
Post a Comment