Class: Moped::BSON::ObjectId
- Inherits:
-
Object
- Object
- Moped::BSON::ObjectId
- Defined in:
- lib/mongoid/extensions.rb
Instance Method Summary collapse
Instance Method Details
#as_json(options = nil) ⇒ Object
3 4 5 |
# File 'lib/mongoid/extensions.rb', line 3 def as_json( = nil) { "$oid" => to_s } end |
#to_xml(options = nil) ⇒ Object
6 7 8 |
# File 'lib/mongoid/extensions.rb', line 6 def to_xml( = nil) ActiveSupport::XmlMini.to_tag([:root], self.to_s, ) end |