Commit 1d2eba6a by Robert Raposa

Fix new relic traces.

parent 3b9d1673
...@@ -88,8 +88,8 @@ require 'yajl/json_gem' ...@@ -88,8 +88,8 @@ require 'yajl/json_gem'
# Note that BSON was moved from Moped::BSON::ObjectId to BSON::ObjectId # Note that BSON was moved from Moped::BSON::ObjectId to BSON::ObjectId
module BSON module BSON
class ObjectId class ObjectId
def to_json def as_json(options = {})
self.to_s.to_json self.to_s
end end
end end
end end
...@@ -100,8 +100,8 @@ class Time ...@@ -100,8 +100,8 @@ class Time
# object. # object.
# Note that this was done to prevent milliseconds from showing up in the JSON response thus breaking # Note that this was done to prevent milliseconds from showing up in the JSON response thus breaking
# API compatibility for downstream clients. # API compatibility for downstream clients.
def to_json(*) def as_json(options = {})
'"' + utc().strftime("%Y-%m-%dT%H:%M:%SZ") + '"' utc().strftime("%Y-%m-%dT%H:%M:%SZ")
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment