I’ve made file_column work with 3 files at the same time, both stored in
one row.
Assuming an ‘applications’ table with the following fields
id
cover_letter
resume
essay
applicant_id
my model would be:
class Application < ActiveRecord::Base
file_column :cover_letter
file_column :resume
file_column :essay
belongs_to :applicant
end
File_column just adds functionality onto an existing AR class, so you
still get to do all of your relationshipss validations, etc. Plus it has
rmagick integration so you can manipulate images if you need that
functionality. It also handles those situations where save fails… So
you don’t have to make your users re-upload the file.