> I would like to do following thing: when the request reaches certain
> method in a controller, I want to read binary data (e.g. an image) from
> database and dynamically make up a URL (without writing that out
> physically), so in the view template I could reference that URL.
>
> How can I do that in rails?
Have a controller/action with a url like: /images/show/123
And in the show() method find the image you want then use send_data().
For example:
send_data image.data, :type => image.content_type,
:disposition => ''inline''
-philip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---