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.
undefined method `table_name' for Paperclip::Attachment:Class
Published 2010-2-19By AJ ONeal
Thanks!
It's really motivating to know that people like you are benefiting
from what I'm doing and want more of it. :)
Did I make your day?
Buy me a coffee
(you can learn about the bigger picture I'm working towards on my patreon page )