diff --git a/app/models/species.js b/app/models/species.js index fee135a..b6d509a 100644 --- a/app/models/species.js +++ b/app/models/species.js @@ -7,7 +7,7 @@ export default DS.Model.extend({ typeSpecies : DS.attr('boolean'), etymology : DS.attr('string'), genusName : DS.attr('string', { defaultValue: config.APP.genus }), - strains : DS.hasMany('strain', { async: true }), + strains : DS.hasMany('strain', { async: false }), totalStrains: DS.attr('number'), createdAt : DS.attr('date'), updatedAt : DS.attr('date'), diff --git a/app/models/strain.js b/app/models/strain.js index 7f69f45..49344cf 100644 --- a/app/models/strain.js +++ b/app/models/strain.js @@ -3,7 +3,7 @@ import Ember from 'ember'; export default DS.Model.extend({ measurements : DS.hasMany('measurements', { async: true }), - species : DS.belongsTo('species', { async: true }), + species : DS.belongsTo('species', { async: false }), strainName : DS.attr('string'), typeStrain : DS.attr('boolean'), accessionNumbers : DS.attr('string'), diff --git a/app/pods/species/index/controller.js b/app/pods/species/index/controller.js index 82a022e..2714e73 100644 --- a/app/pods/species/index/controller.js +++ b/app/pods/species/index/controller.js @@ -2,7 +2,7 @@ import Ember from 'ember'; export default Ember.Controller.extend({ sortParams: ['speciesName', 'strainCount'], - sortedSpecies: Ember.computed.sort('species', 'sortParams'), + sortedSpecies: Ember.computed.sort('model', 'sortParams'), metaData: function() { return this.store.metadataFor('species'); diff --git a/app/pods/species/index/route.js b/app/pods/species/index/route.js index b0968ba..6b02e0e 100644 --- a/app/pods/species/index/route.js +++ b/app/pods/species/index/route.js @@ -3,13 +3,6 @@ import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixi export default Ember.Route.extend(AuthenticatedRouteMixin, { model: function() { - return Ember.RSVP.hash({ - species: this.store.findAll('species'), - strains: this.store.findAll('strain'), - }); - }, - - setupController: function(controller, models) { - controller.setProperties(models); - }, + return this.store.findAll('species'); + } });