module MongoidExtended::ObjectId::HashRepresentation
rewrite methods ‘BSON::ObjectId#as_json` & `BSON::ObjectId#to_json` Return the object id as a JSON hash representation.
@example Get the object id as JSON.
object_id.as_json
@return [ String ] The object id as a JSON string.
@since 2.0.0
Public Instance Methods
as_json(*args)
click to toggle source
# File lib/mongoid_extended/object_id.rb, line 31 def as_json(*args) to_s end
to_json(*args)
click to toggle source
# File lib/mongoid_extended/object_id.rb, line 27 def to_json(*args) to_s end