Class: BSON::ObjectId

Inherits:
Object show all
Extended by:
Mongoid::Extensions::ObjectId::Conversions
Defined in:
lib/mongoid/extensions.rb

Overview

:nodoc

Instance Method Summary collapse

Methods included from Mongoid::Extensions::ObjectId::Conversions

convert

Instance Method Details

#as_json(options = nil) ⇒ Object



82
83
84
# File 'lib/mongoid/extensions.rb', line 82

def as_json(options = nil)
  to_s
end

#to_xml(options = nil) ⇒ Object



85
86
87
# File 'lib/mongoid/extensions.rb', line 85

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