Agile Web Development with Rails - 2nd Ed has a section on attaching images. That may help you.
Regards,
Dave Dumaresq