This project is archived and is in readonly mode.
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
-
Santiago Pastorino November 7th, 2010 @ 12:17 PM
- Milestone set to 3.1
- Assigned user set to Aaron Patterson
- Importance changed from to Low
-
Repository November 16th, 2010 @ 10:28 PM
- State changed from new to resolved
(from [c801f233df9d20c59d9756a5279365603dc5cbbd]) reloading an association will properly set attributes of instantiated objects. Thanks Brian Palmer [#5802 state:resolved] https://github.com/rails/rails/commit/c801f233df9d20c59d9756a527936...
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>
People watching this ticket
Attachments
Referenced by
- 5802 ActiveRecord::AssociationsAssociationCollection.load_target doesn't respect protected attributes (from [c801f233df9d20c59d9756a5279365603dc5cbbd]) reloadi...