Erwin1
(Erwin)
1
is there a way to render a file in another window
I wrote :
def show
@asset = Asset.find(params[:id])
respond_to do |format|
format.html
format.xml { render :xml => @asset }
format.pdf {render :file => @asset.data.path }
end
end
this render in the current window....
thanks for your suggestions
erwin
11175
(-- --)
2
format.pdf {send_data(@asset, :filename => @asset.data.path, :type
=>'application/pdf',:disposition => 'inline') }
Sijo
Erwin1
(Erwin)
3
Thanks Sijo
I also found that I could use the :popup => true in the 'link_to'