On Thursday, April 26, 2012 12:09:37 PM UTC-3, Brian Bokor wrote:
> This works!
> photo = Photo.create(:attachable => old_model, :order => 1)
> photo.write_uploader(:image, old_model.photo)
> photo.save!
> On Friday, April 20, 2012 5:12:40 PM UTC-4, Brian Bokor wrote:
>> I have been able to migrate my images to the new model but it keeps the
>> old image around. I think I'm doing this incorrect.
>> I have a Photo Model and ImageUploader with Fog (have also tried the
>> remote_image_url method
>> I wanted to migrate my old images to the Photo Model and would rather
>> just set the image field with the filename then reprocess later, but it
>> won't let me do this since it is serialized to the Uploader. Any
>> suggestions
>> Would be ideal but doesn't work
>> photo = Photo.new(:attachable =>old_model)
>> photo.image = "test.jpg"
>> photo.save!
>> Works but doesn't delete old files
>> photo = Photo.new(:attachable => old_model)
>> photo.remote_image_url = "http://test.com/test.jpg"
>> photo.image.recreate_versions!
>> photo.save!