This project is archived and is in readonly mode.

#5802 ✓resolved
Brian Palmer

ActiveRecord::AssociationsAssociationCollection.load_target doesn't respect protected attributes

Reported by Brian Palmer | October 13th, 2010 @ 10:12 PM | in 3.1

load_target uses mass assignment, which means that protected attributes don't get updated with their correct db values during the merging process. What's worse, this is a silent failure (except for a log warning depending on the env) so it's really tricky to track down.

This patch provides a test case and a fix.

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>


Referenced by