how to show images stored in the database

Actually i have came across a situation where i will have to store an
image in the database and show the same image.. for this purpose i have
used LONGBLOB field in mysql and stored the image..
  I have to show this image to the user from db.. and i dont knwo how to
show the image in this way..
I have got answer for this in php on
http://www.weberdev.com/get_example-4062.html(php code.)
There is some function called Header in php but i dont know about
rails...
Pls help me out..
Thanks and regards
Saurabh Purnaye
saurabh.purnaye@gmail.com

Actually i have came across a situation where i will have to store an
image in the database and show the same image.. for this purpose i
have
used LONGBLOB field in mysql and stored the image..
I have to show this image to the user from db.. and i dont knwo how
to
show the image in this way..

Use send_data. It allows you to tell the browser what mime type the
image is so that the browser knows what to do with it.
something like this should do the trick

send_data(some_chunk_of_data, :disposition => 'inline', :type=> 'image/
png', :filename => 'foo.png')