Learning Ember with Ember.js guides. While practicing ToDo application, I renamed model from todo to tododata but I get Error while processing route: todos No model was found for 'tododata' Error: No model was found for 'tododata'}).
Renaming model back to todo works fine. Not sure what is wrong (except the fact there is CamelCase is being used). Would appreciate some direcction
My setup:
Model: In guide Todos.Todo but I named it Todos.TodoData for clarity.
Todos.TodoData = DS.Model.extend({
...
});
Router: In guide ...find('todo');, I use ...find('tododata');
Todos.TodosRoute = Ember.Route.extend({
model: function() {
return this.store.find('tododata');
}
});
Controller: In guide it was todo, mine is tododata
Todos.TodosController = Ember.ArrayController.extend({
actions: {
...
var todo = this.store.createRecord('tododata', {
...
});
...
}
});
Using TodoData instead of tododata works fine but I am not sure if this is a correct usage (because my thinking is tododata is an instance of TodoData).