Closed PaulAik closed 12 years ago
What version of AR do you use, and where do you get "ActiveRecord::ReadOnlyRecord"?
There might be no difference between createing and updateing object, can you explain more? And it's better to handel all models that acts as same parent in a single controller.
I've encountered this same error. AR is at 3.2.0. Anytime I get one of my classes it will not let me even call save on the object without throwing this same error. Any ideas?
fixed thanks to wharle90
If I try to update an acts_as_relation model in my controller, I get the following error:
"ActiveRecord::ReadOnlyRecord"
I believe this is something to do with the join on the object's tables (superclass + class tables). I think there should be a '.readonly(false)' in there somewhere, but I'm not sure how to add.
What's the recommended method of updating acts_as_relation objects via forms (e.g. form POST)?