Class: BSON::ObjectId

Inherits:
Object show all
Defined in:
lib/mongo_mapper/extensions/object_id.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object



23
24
25
# File 'lib/mongo_mapper/extensions/object_id.rb', line 23

def as_json(options=nil)
  to_s
end

#original_to_jsonObject



21
# File 'lib/mongo_mapper/extensions/object_id.rb', line 21

alias_method :original_to_json, :to_json

#to_json(options = nil) ⇒ Object



27
28
29
# File 'lib/mongo_mapper/extensions/object_id.rb', line 27

def to_json(options = nil)
  as_json.to_json
end