mardi 24 février 2015

Ember error: No model was found

When I visit a route that has a model hook:



export default Ember.Route.extend({
model: function () {
return this.store.find("account_type");
}
});


I get this error:


Error while processing route: register No model was found for 'account_type' Error: No model was found for 'account_type'


I have a file in models called account_type.js :



import DS from 'ember-data';

export default DS.Model.extend({
type: DS.attr('string')
});


Any ideas?





2 commentaires:

  1. Try:
    this.store.find("account-type");
    And file name to account-type.js

    RépondreSupprimer
  2. Try:
    this.store.find("account-type");
    And file name to account-type.js

    RépondreSupprimer