Class: Moped::BSON::ObjectId

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) as_json(options = nil)



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

def as_json(options = nil)
  to_s
end

- (Object) to_xml(options = nil)



13
14
15
# File 'lib/mongoid/extensions.rb', line 13

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