Closed tdegrunt closed 9 years ago
Okay, this is my own fault I guess. I read somewhere that to fix the JSON serialization for the _id, one needed an initialiser with:
module BSON
class ObjectId
alias :to_json :to_s
alias :as_json :to_s
end
end
Everything was working, once I changed this initializer to:
module BSON
class ObjectId
def to_json(arg=nil)
to_s
end
def as_json(arg=nil)
to_s
end
end
end
Closing ...
Trying to use backburner with Mongoid. Am I doing something wrong?
I have a User class:
Then I'm trying in the rails console, with pry:
This seems to be the relevant section of the backtrace: