I'm using the following in rails to push to node.js:
NodePush[].trigger('unit', 'join', {:id =>record.user_id, :name => record.user.name}, record.unit_id)
Problem I'm having is console is logging the results as:
{"id":7154,"name":"Medallions"}
What I want is for the console to output an object like so:
Object
id: 7154
name: "Medallions"
Any suggestions on how to update the rails code to create an object? Thanks