aq1018/mongoid-history — Issue #28: Doesn't work with CarrierWave fields
Author: erlingwl
Created: 2012-03-06 10:21:56+00:00
State: open

It would be awesome to be able to keep a history of files that has been uploaded to S3 with carrierwave. At the moment this doens't work out of the box, but I might have a go at solving it. It would mean duplicating/copying files on S3 etc. Here's a sample stacktrace if you try to include a carrierwave field in the track_history :on => [:some_carrierwave_file_field]

BSON::InvalidDocument - Cannot serialize an object of class SomeUploader into BSON.:
/Users/erlingwl/.rvm/gems/ruby-1.9.2-p290/gems/bson-1.3.1/lib/bson/bson_c.rb:24:in `serialize'
/Users/erlingwl/.rvm/gems/ruby-1.9.2-p290/gems/bson-1.3.1/lib/bson/bson_c.rb:24:in `serialize'
......
/Users/erlingwl/.rvm/gems/ruby-1.9.2-p290/bundler/gems/mongoid-history-71394cfa4ff6/lib/mongoid/history/trackable.rb:194:in `track_update'