You can use to to_json or as_json with :include option. In your api:
resources :comments
get :id do
Comment.includes(:user).find(params[:id]).to_json(include: :user)
end
end
However, sooner or later you will probably need more control over the json responses generated by your API. I would suggest you to take a look at grape-rabl gem (or some other solution for building json - there are plenty of them out there). It will grant you much finer control...