Odd $oid prefix on id field

17 views
Skip to first unread message

Ian Chilton

unread,
May 23, 2013, 5:06:44 PM5/23/13
to ruby-...@googlegroups.com
Hi,

Have been working updating all of the gems on our Rails app and after doing so, found our API was broken.

After some debugging, it seems to be because id fields are now represented differently.

Instead of:
{"verse":{"id":"516298920fb8600002000001",

They are now coming through as:
{"verse":{"id":{"$oid": "516298920fb8600002000001"},

We're using Grape from the github repo and it looks like grape-rabl has gone from 0.1.0 on our stable app to 0.2.0.

Any ideas what would cause this and how I can turn it off to revert to the old behaviour?

Thanks,

Ian

Ian Chilton

unread,
May 23, 2013, 5:07:20 PM5/23/13
to ruby-...@googlegroups.com
Sorry, I should have mentioned that we are using MongoDB and have moved from Mongoid 2.x on the stable app to 3.x in dev also.

Thanks,

Ian
Reply all
Reply to author
Forward
0 new messages