Rough in species

This commit is contained in:
Matthew Dillon 2015-06-02 14:27:23 -08:00
parent dfc62cd1ac
commit afcf24a8d8
22 changed files with 399 additions and 2 deletions

View file

@ -0,0 +1,20 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['grid-1'],
isEditing: false,
isNew: false,
actions: {
editSpecies: function() {
this.get('species').get('errors').clear();
if (this.get('isNew')) {
this.get('species').destroyRecord().then(this.sendAction());
}
this.toggleProperty('isEditing');
this.get('species').rollback();
},
saveSpecies: function() {
this.get('species').save().then(this.toggleProperty('isEditing'));
}
}
});