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.
on 2006-03-10 16:35
on 2006-03-10 19:56
Hogan, Brian P. wrote: > I've made file_column work with 3 files at the same time, both stored in > one row. Hi, I've got a bit different situation, as i want to create many rows of the same object, each for a single file, in one form. I tried using "'index' => number" on file_column helper method, but i get: undefined method `stringify_keys!' for "":String