Hi John,
Thanks for the quick response.
I wanted to show the image along with other data from the controller.
How do I do that. Looks like I am not understanding it.
Would not work. Sorry for my ignorance.
Thanks
Silvy Mathews
Hi John,
Thanks for the quick response.
I wanted to show the image along with other data from the controller.
How do I do that. Looks like I am not understanding it.
Would not work. Sorry for my ignorance.
Thanks
Silvy Mathews
On 4/12/06, [email protected] [email protected] wrote:
I wanted to show the image along with other data from the controller.
<%= send_file '\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"', :type => 'image/jpeg', :disposition => 'inline'%>
How do I do that. Looks like I am not understanding it.
…
Silvy,
What you want to do is set up a controller that handles the dispatching
of
the images. It is there that you would have the send_file command.
Remember that in HTTP you are going to have seperate request for each
item
on the page, so map the new controller url using routes and use that url
in
your view, for example “/dynamicimages/abc.gif”.
Does that make sense?
Josh
Yea sorry my response was a little short - that function would go in the
controller, i.e.
class FileGrabberController < ApplicationController
def grab_file
send_file ‘/path’, :type => ‘image/jpeg’, [etc]
end
end
then either call the controller directly using an image tag or use a
helper…
let me know if that helps - I can post a working example when I get home
tonight [on the laptop at home]…
Quoting [email protected]:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs