Friday, February 19, 2010

undefined method `table_name' for Paperclip::Attachment:Class

Every example that I've seen for paperclip shows it being used with images, not with arbitrary files. Well, it works just fine with arbitrary files -- as long as the name of the model which houses your files is not "Attachment". That name somehow collides with "Paperclip:Attachment".

Something like "Medium" or "MyAttachment"will work fine. I'd be interested to know if "File" works, but I didn't try it for myself.


Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home