Image Processing with Rails

Thanks for a good introduction to operate images.
I have a few questions:

  1. I want to know how to save the image files, which is uploaded, with database such as Postgresql.
  2. I want to know how to load the image files from the database and display them on the html page.

If you know how to solve them, could you help me?