lib/mongo_mapper_ext/fixes.rb in rails-ext-0.2.17 vs lib/mongo_mapper_ext/fixes.rb in rails-ext-0.2.18

- old
+ new

@@ -1,9 +1,12 @@ -MongoMapper::Plugins::Keys::Key.class_eval do - def get(value) - if value.nil? && !default_value.nil? - return default_value.respond_to?(:clone) ? default_value.clone : default_value - end +# +# ObjectID +# +Mongo::ObjectID.class_eval do + def == other + self.to_s == other.to_s + end - type.from_mongo(value) + def to_yaml *args + to_s.to_yaml *args end end \ No newline at end of file