This project is archived and is in readonly mode.
Cloned object mimic changed_attributes from creator after being clonde
Reported by Federico Brubacher | May 16th, 2010 @ 11:29 AM | in 3.0.2
After creating a clone , when changing an attribute in either the parent or the clone, both objects are marked as changed.
Here's a failing test.
Comments and changes to this ticket
-
José Valim May 16th, 2010 @ 02:10 PM
- Milestone cleared.
- Tag changed from 3.0, activerecord, dirty to 3.0, activerecord, bugmash, dirty
-
Federico Brubacher May 16th, 2010 @ 02:35 PM
- Tag changed from 3.0, activerecord, bugmash, dirty to 3.0, activerecord, dirty
I've attached a patch.
This patch includes the test case that no longer fails and a fix.
-
Federico Brubacher May 16th, 2010 @ 02:36 PM
- Tag changed from 3.0, activerecord, dirty to 3.0, activerecord, dirty, patch
-
Federico Brubacher May 16th, 2010 @ 02:37 PM
- Tag changed from 3.0, activerecord, dirty, patch to 3.0, activerecord, bugmash, dirty, patch
-
José Valim May 16th, 2010 @ 03:11 PM
- Assigned user set to José Valim
Federico, could you change your patch to make changed_attributes a public method, so we don't need to use instance_variable_get?
-
Federico Brubacher May 16th, 2010 @ 03:51 PM
Jose, here is the patch with marked attributes as public
-
Santiago Pastorino May 16th, 2010 @ 08:45 PM
- Tag changed from 3.0, activerecord, bugmash, dirty, patch to 3.0, activerecord, bugmash, bugmash-review, dirty, patch
- State changed from new to verified
Great federico +1
-
Rizwan Reza May 16th, 2010 @ 09:39 PM
- Tag changed from 3.0, activerecord, bugmash, bugmash-review, dirty, patch to 3.0, activerecord, bugmash-review, dirty, patch
-
Repository May 16th, 2010 @ 10:09 PM
- State changed from verified to resolved
(from [6b4e0cc526f55b5532cf99292c94f0a4db53b16f]) a cloned object no longer mimics changed flags from creator , plus a test case [#4614 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/6b4e0cc526f55b5532cf99292c94f0... -
Rizwan Reza May 17th, 2010 @ 12:22 PM
- Tag changed from 3.0, activerecord, bugmash-review, dirty, patch to 3.0, activerecord, dirty, patch
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to Low
-
joson April 29th, 2011 @ 09:07 AM
Very nice, thank you for you sharing. A Replica Breitling is a timepiece of high quality and functionality and you will have all the class, prestige and luxury of a wealthy, successful individual. By choosing from our selection of luxury Replica Watches , you can improve your self-esteem and feel confident to enter new circles of business associates and friends. These Rolex Replicas will surely enhance your style and only you will know the watch you wear did not cost you $1,000's of dollars.
.
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
- 4614 Cloned object mimic changed_attributes from creator after being clonde (from [6b4e0cc526f55b5532cf99292c94f0a4db53b16f]) a clone...