Forum: Ruby on Rails send_data not working properly with link_remote_to

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Srinivas M. (Guest)
on 2006-05-17 21:26
 I'm reading an image in an link_to_remote call,and then using send_data
i send the read image as :type => "image/png" :disposition =>
"inline"...but when the div tag gets updated i see only ascii characters
.....but if i do the same operation using normal call(link_to) i see it
functioning normal ....could someone explain .

my view:
<%= link_to_remote("flip",
     :update => "img",
     :url => {:action => "flip"}
<div id="img"></div>

def flip
    ilist =
    send_data(@out,:filename =>'workshopimage', :type => "image/png",
:disposition => "inline")

the above doesnt work
but with my view as
<%= link_to("flip",
     :action => "flip"
it doesnt it mean i need to do some thing more incase of an
ajax call i missing something ..?
This topic is locked and can not be replied to.