lib/json_builder/extensions.rb in json_builder-3.1.6 vs lib/json_builder/extensions.rb in json_builder-3.1.7
- old
+ new
@@ -73,12 +73,24 @@
def to_builder
%("#{to_time.iso8601}")
end
end
+# Mongoid < 3.0.0
module BSON
class ObjectId
def to_builder
%("#{self}")
+ end
+ end
+end
+
+# Mongoid >= 3.0.0
+module Moped
+ module BSON
+ class ObjectId
+ def to_builder
+ %("#{self}")
+ end
end
end
end