I am working on updating the application to Rails 3, and attachment_fu is broken, so I go to the carrier. Is there a systematic process that I can go through to move from attachment_fu to the carrier? Or a tutorial for this? Right now, I'm more interested in getting everything in the database right. I use the file system storage option for attachment_fu and carrier.
I found a module, UploaderFu from http://ruby.simapse.com/2011/03/migrate-attachmentfu-to-carrierwave.html that tells carrierwave to use the same directories and file names as attachment_fu. But this is not the whole answer, just part of it.
For example, in db, I have a UserImage model, with attributes :filename UserImage :width :user_id :height and :user_id . I added a column :user_avatar and the following to my model
attr_accessible :user_avatar mount_uploader :user_avatar, UserAvatarUploader
What exactly is stored in :user_avatar . Is this just a file name? or something different? I just need to write a hyphen to move the data in :filename (saved as "hello_world.png" ) to :user_avatar ? If in this case I should just use the original :filename instead of creating the :user_avatar column, right?
source share