I have a user object and message object where there is user_id in message model. When I do Message.find(1) how can I get user object as part of the json object or what is the correct way to inject? So it would have the whole user object instead of just user_id
I know I can get it from @message.user but not sure what is the correct way of injecting.