Refactoring strains

This commit is contained in:
Matthew Dillon 2015-07-08 14:44:24 -08:00
parent 5290e7efd7
commit 01a3075655
23 changed files with 275 additions and 223 deletions

View file

@ -7,12 +7,12 @@ export default Ember.Controller.extend({
if (species.get('isDirty')) {
species.save().then((species) => {
this.transitionToRoute('species.show', species.get('id'));
this.transitionToRoute('species.show', species);
}, (err) => {
this.get('flashMessages').error(err.responseJSON.error);
});
} else {
this.transitionToRoute('species.show', species.get('id'));
this.transitionToRoute('species.show', species);
}
},
@ -22,7 +22,7 @@ export default Ember.Controller.extend({
species.get('errors').clear();
species.rollback();
this.transitionToRoute('species.show', species.get('id'));
this.transitionToRoute('species.show', species);
},
},