-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Attributes
-
Fully Compatible
The document #clone method is currently quite inefficient and could be improved. See the provided gist and PR for reference.
[Original description]
We have some problems with `clone` method and `protected_attributes_continued` gem. When calls `self.class.new(attrs)` for attributes, which not included in `attr_accessible` list.
I rewrote this code. It is not only resolved our problem, but it increases total copy execution speed:
https://gist.github.com/vsevolod/28055a93f3ec2539f2582b2c91420990