I am trying to fetch a singleton resource which has the following route: /api/users/:user_id/profile. The user model knows nothing about the profile. The models are defined as follows:
class UsreProfile < ActiveRecord::Base
belongs_to :user
end
How can I define Emberjs models and routes so that if i go to /users/1/profile it fetches the profile of the user? I've been trying to find out how to define singleton resources in emberjs but could not find anything suitable.
Aucun commentaire:
Enregistrer un commentaire