1

I am trying to download data to the user in Ruby on Rails via the ActionController method 'send_data' and the results keep opening directly within the browser (instead of opening as an attachement, even though I am setting :disposition to 'attachment') - has anyone seen this problem before?

here's the call I make:

send_data data, :type => 'text/csv', :disposition => 'attachment', :filename => "assessments_results.csv"

  • update on this: I tried disabling turbolinks, as suggested here: http://stackoverflow.com/questions/14818015/rails-wont-send-data-as-file but still no luck :( – user5812088 Jan 28 '16 at 20:15

0 Answers0