lib/ripple/embedded_document.rb in ripple-0.9.0.beta2 vs lib/ripple/embedded_document.rb in ripple-0.9.0

- old
+ new

@@ -36,14 +36,23 @@ include Ripple::Callbacks include Ripple::Conversion include Finders include Ripple::Inspection include Ripple::NestedAttributes + include Ripple::Serialization end module ClassMethods def embeddable? true + end + end + + module InstanceMethods + def ==(other) + self.class == other.class && + _parent_document == other._parent_document && + attributes.except('_type') == other.attributes.except('_type') end end end end