This project is archived and is in readonly mode.
[PATCH] Added AR:B#dup method for duplicationg object without frozen attributes
Reported by Timur Vafin | June 30th, 2009 @ 07:18 PM | in 2.x
Standard way to unfreeze object is to call dup method on it, but this does not working AR:B object, b/c in the ActiveRecord::Base methods #freeze and #frozen? overwritten for changing @attributes directly.
Here is simple patch with test for implementing #dup on AR:B.
Comments and changes to this ticket
-
Repository July 1st, 2009 @ 08:24 PM
- State changed from new to resolved
(from [16dc139caa9286638785469304a69ab77e4fe9b5]) Added AR:B#dup method for duplicationg object without frozen attributes [#2859 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche ykatz+clerche@engineyard.com
http://github.com/rails/rails/commit/16dc139caa9286638785469304a69a...
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
Tags
Referenced by
- 2655 Rails.cache freezes all objects passed to it These issues still here, here are two patches: * #2860 - ...
- 2655 Rails.cache freezes all objects passed to it #2859 - fixup cache issue fo AR:B object
- 2859 [PATCH] Added AR:B#dup method for duplicationg object without frozen attributes (from [16dc139caa9286638785469304a69ab77e4fe9b5]) Added A...