lib/mongomodel/concerns/attribute_methods/dirty.rb in mongomodel-0.2.5 vs lib/mongomodel/concerns/attribute_methods/dirty.rb in mongomodel-0.2.6
- old
+ new
@@ -9,10 +9,10 @@
after_save { changed_attributes.clear }
end
# Returns the attributes as they were before any changes were made to the document.
def original_attributes
- attributes.merge(changed_attributes)
+ {}.merge(attributes).merge(changed_attributes)
end
protected
def changed_attributes
attributes.changed