According to the docs:
If you’re using Ember Data, you only need to override the model hook if you need to return a model different from the record with the provided ID
But this does not work for me, ember data gives me wrong data.
App.UsersEditRoute = Ember.Route.extend
model: (params) ->
return ['Just', 'Some', 'Random']
setupController: (controller, model) ->
controller.set('model', model) # Returns @get('store').find 'user', params.user_id
This should return [‘Just’, ‘Some’, Random], but instead it gives me the original @get(‘store’).find ‘user’, params.user_id
Why and how do I get the data I want? Btw, If I do like below, everything works, but I want to know why my model function never is called.
setupController: (controller, model) ->
controller.set('model', ['Just', 'Some', 'Random']) # returns ['Just', 'Some', 'Random']
Thank you, I’m using ember-data 0.14 and ember 1.0.0