Re: render file

shai
Thu, 03 May 2007 08:08:36 -0000

Zirael wrote:
> Hi,
> I want to send file in the response,
> I found it''s possible with render method:
>  def get_file
>     render :file => path, :content_type =>
"application/x-unknown"
> end.
>
> 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?
>
> Greets.

...ever look into the FileUtils / File classes?

--
Posted via http://www.ruby-forum.com/.