This project is archived and is in readonly mode.

#3131 ✓resolved

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

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=""></a>

People watching this ticket