After adding simply_versioned support in a model that is using attachment_fu with S3 storage, I was getting this strange error the second time my versions association was used in my application:
NoMethodError (undefined method `quoted_table_name' for "0.5.1":String)
After a few hours, I finally figured out that this was caused by the aws/s3 setting its Version to “0.5.1″ (in a module). That module gets included by attachment_fu. The simply_versioned plugin uses a Version model. So I don’t know it this a bug with attachment_fu or Rails, but here’s what I did to fix the problem.
- Rename the Version model to DataVersion
- add “set_table_name ‘versions’” in the DataVersion model if you don’t want to rename the table in the database
- In the simply_versioned.rb file, search for the “has_many” instruction and add :class_name => ‘DataVersion’
And voilà. Everything should work fine now.








Hey there, I’ve been looking into a similar solution for versioned file uploads; I take it from this post that you managed to get this setup working with normal filesystem storage?
Not really, I have attachment_fu configured to use Amazon S3 storage in my model. If you use “filesystem” storage (the default in attachment_fu), I guess you shouldn’t run into problems with simply_versioned.
thanks for the bacon-saving writeup!