Strain-details: controller -> component

This commit is contained in:
Matthew Dillon 2015-06-01 09:39:56 -08:00
parent 20765e5dac
commit c5b28f7204
6 changed files with 158 additions and 152 deletions

View file

@ -0,0 +1,15 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['grid-1'],
isEditing: false,
actions: {
editStrain: function() {
this.get('strain').get('errors').clear();
this.toggleProperty('isEditing');
},
saveStrain: function() {
this.get('strain').save().then(this.toggleProperty('isEditing'));
}
}
});