I have a controller action that allows a user to download a file with an extension of .ppt . It\'s not really a powerpoint binary, just an xml-ish format that powerpoint can
You could use send_data:
send_data pptdata, :filename => 'your_file_name.ppt',
:disposition => 'inline', :type => "multipart/related"
Another advantage of this is you can use x-sendfile, so that you're mongrel/thin isn't waiting while the client downloads the data.
Another option would be to have a route like:
/elements/3/files/foo.ppt
Then in your show method for the FilesController you can send whatever the id parameter would be.