Class: Moped::BSON::ObjectId

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/extensions.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object



8
9
10
# File 'lib/mongoid/extensions.rb', line 8

def as_json(options = nil)
  to_s
end

#to_xml(options = nil) ⇒ Object



11
12
13
# File 'lib/mongoid/extensions.rb', line 11

def to_xml(options = nil)
  ActiveSupport::XmlMini.to_tag(options[:root], self.to_s, options)
end