Created
May 27, 2015 05:30
-
-
Save umar-webonise/eb060fb86a3b6f8aac27 to your computer and use it in GitHub Desktop.
Omiting $oid when coverting to json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place code in config/initializers/bson.rb | |
module BSON | |
class ObjectId | |
def as_json(*args) | |
to_s | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment