This project is archived and is in readonly mode.
multiparamter_attribute assignment fails when used via assoication
Reported by stefanpenner | September 1st, 2009 @ 09:36 PM | in 2.3.6
It seems multiparameter_attributes fail when being assigned via
an association proxy.
After some muddling, it turns out the AR::Base#initialize was to
blame. The situation seems to be arise when the attributes are
associated via some scope. AR::Base#initialize does not support
this case.
Luckily def attributes= Does, so I merely extracted the attribute assignment code from def attributes=, into def assigns_attribute.
Now both def attributes= and initialize assign attributes via def assign_attribute.
Problem seems to be solved
The following is a patch for origin/2-3-stable which includes
patch and regression test.
If needed I can also throw down a patch for master.
Comments and changes to this ticket
-
stefanpenner September 1st, 2009 @ 09:44 PM
- Tag changed from 2.3.4 to 2.3.4, activerecord, multiparameter_attributes
- Title changed from multiparameter_attribute assignment fails when used via assoication to multiparamter_attribute assignment fails when used via assoication
-
CancelProfileIsBroken September 25th, 2009 @ 12:36 PM
- Tag changed from 2.3.4, activerecord, multiparameter_attributes to 2.3.4, activerecord, bugmash, multiparameter_attributes
-
Yehuda Katz (wycats) January 3rd, 2010 @ 07:53 AM
- Milestone set to 2.3.6
- State changed from new to resolved
Closed by c362a76d00c9d023e23fb15aae638512a09e2948. This problem cannot be reproduced on master.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>