How to convert rails Active Records Object ID: hash object name for JSON object
Users.select("id,name").all
In json
{1:manish,2:john,3:paulo}
I need the output json as above, so I can use it in my JavaScript.
Please help me with this!
source
to share