On Thu, Aug 13, 2009 at 12:58 PM, Paul
Gillard<paulmgill...@googlemail.com> wrote:
> Currently ActiveRecord::Base overrides #clone and creates clones using
> #new. This means newly cloned objects are initialized via a
> combination of #clone and #initialize instead of via #initialize_copy.
> Is the Rails core group interested in seeing a patch which removes the
> ActiveRecord#clone method and instead implements cloning by defining
> an #initialize_copy method?


Wasn't some of the stuff is AR::Base#clone fixed to handle issues with
attribute copying or initializers? I think I remember something like 3
years ago.. but I'm too lazy to search.

My feeling is that AR::Base#clone does was 99% of developers expect it
to do. Any deep copying that happens usually ends up in a unique
method on the class a la  'object.deep_copy'. I support the idea of
the change, I just worry that it might be more work than its worth.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to