I want to send file in the response,
I found it's possible with render method:
render :file => path, :content_type => "application/x-unknown"
But there is one problem,
the default name of that file in system dialog is the method name.
Is it possible to set default file name?
The file name is the last path step of the url... so put a complete url for that download in routes and map it to your get_file action... something like:
:controller => 'mycontroller', :action => 'get_file'
Note that you may also need to set the Content-Disposition header to Attachment to get a file save dialog on some browsers... depending on the content-type I suppose.