moiristo / deep_cloneable

This gem gives every ActiveRecord::Base object the possibility to do a deep clone that includes user specified associations.
MIT License
786 stars 88 forks source link

Change #dup to #deep_clone #37

Closed seanculver closed 10 years ago

seanculver commented 10 years ago

This changes the dup method from #dup to #deep_clone as suggested in https://github.com/moiristo/deep_cloneable/issues/24 by @unixmonkey

WARNING!!! This is potentially a backwards incompatible commit, as it changes the api for the object. I'm wondering if this belongs somehow on a different branch.

Tests are all passing, no changes to actual content of the tests, just the method used.

I've updated some of the docs but I imagine there are parts that need to be updated beyond what I've done.

This avoids the issue with incompatible gems such as friendly id. https://github.com/norman/friendly_id/blob/master/lib/friendly_id/base.rb#L255

moiristo commented 10 years ago

Thanks! I'll create a new major release for this.