Cleaning up species and strains
This commit is contained in:
parent
01a3075655
commit
780b5ddb6c
13 changed files with 59 additions and 65 deletions
|
@ -5,10 +5,16 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
|||
model: function(params) {
|
||||
return Ember.RSVP.hash({
|
||||
strain: this.store.find('strain', params.strain_id),
|
||||
species: this.store.findAll('species'),
|
||||
species: this.store.findAll('species'), // Need for dropdown
|
||||
});
|
||||
},
|
||||
|
||||
afterModel: function(models) {
|
||||
if (!models.strain.get('canEdit')) {
|
||||
this.transitionTo('strains.show', models.strain.get('id'));
|
||||
}
|
||||
},
|
||||
|
||||
setupController: function(controller, models) {
|
||||
controller.setProperties(models);
|
||||
},
|
||||
|
|
Reference in a new issue