I have two routes, let's call them /user and /user/actions. How do I access the user model from a UserActionsController method?
I've tried something like:
this.modelFor('user').get('id')
and
this.get('target').modelFor('user').get('id)
but in both cases it sais that 'modelFor' is undefined and not a function.
Maybe I have not given this enough thought, but can't you simply access
App.User
?I might have misunderstood the question of course.
in a controller you would use
needs
and then get it off the controller.http://emberjs.jsbin.com/dofedehi/1/edit