Class: BSON::ObjectId

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

Overview

Monkey patch BSON::ObjectId to just return the string for to_json. This is done to match operation in bonnie.

Instance Method Summary collapse

Instance Method Details

#as_json(*args) ⇒ Object



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

def as_json(*args)
  to_s.as_json
end

#to_json(*args) ⇒ Object



4
5
6
# File 'lib/ext/mongoid.rb', line 4

def to_json(*args)
  to_s.to_json
end