I am using Rails 4.1.5 and Mongoid 4.0. My apis returns mongo id as hash
{
_id: {
$oid: "541e79bc616b684e75000000"
}
created_at: "2014-09-21T07:09:48.599Z"
}
I need something like this
{
id: "541e79bc616b684e75000000"
created_at: "2014-09-21T07:09:48.599Z"
}
I already checked this question , but I'm not sure which file I need to make the changes mentioned in this answer
source
share