Just started learning how to use paper_clip. I installed everything according to the instructions and tried to download the image (profile_pic) ...
I got an error that mass_pic cannot assign ...
so I added attr_accessible :: profile_pic
And that stopped this error. I am wondering, I do not have the "profile_pic" column in my user table. Instead, thanks to paper_clip, I have: t.string "profile_pic_file_name" t.string "profile_pic_content_type" t.integer "profile_pic_file_size" t.datetime "profile_pic_updated_at"
So, trying to figure out the rails, how can this fix the problem? Does the model set attr_accessible: profile_pic works as a wildcard for everything after pic, or is it some kind of paper_clip magic?
thank
source
share