Wow, what a great site! Hope this question meets the requirements :-)
Typically, this question is about how to set response headers in Rails using the render method. In particular, I have a discounted version of a document that I would like the browser to save as the default file rather than displaying it. I found that you can set headers using the head method, for example:
respond_to do |format| format.html {... format.text { head(:content_disposition => "attachment") } end
But render options don't work like that, and I can't find anything to access the headers in advance from the controller. Can anyone offer advice?
Thanks for taking the time to read my question.
source share