Permalink
Browse files

Fix 2nd bug with clone

  • Loading branch information...
1 parent a992007 commit 2fbda607d7a2ea2ba36b922db1fcd84fdcac9b6a @georgepalmer georgepalmer committed Feb 11, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +1 −1 lib/couch_foo/base.rb
View
@@ -9,3 +9,4 @@
0.7.8 - _id and _rev are not valid XML so converted to id and rev on .to_xml call
0.7.9 - Make Model.find order by :created_at if no conditions present and fix initialisation of non-native types
0.7.10 - Fixed clone bug and added CouchDB introduction section to readme
+0.7.11 - Fixed 2nd bug with clone
View
@@ -1697,7 +1697,7 @@ def destroy
def clone
attrs = clone_attributes(:read_attribute_before_type_cast)
- attributes_protected_by_default.each {|a| attrs.delete(a)}
+ attributes_protected_by_default.each {|a| attrs.delete(a) unless a == "ruby_class"}
record = self.class.new
record.send :instance_variable_set, '@attributes', attrs
record

0 comments on commit 2fbda60

Please sign in to comment.