Rough in strain editing
This commit is contained in:
parent
f902c7500b
commit
e2aa298a8f
4 changed files with 93 additions and 12 deletions
14
app/controllers/strains/show.js
Normal file
14
app/controllers/strains/show.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
isEditing: false,
|
||||
actions: {
|
||||
editStrain: function() {
|
||||
this.get('model').get("errors").clear();
|
||||
this.toggleProperty('isEditing');
|
||||
},
|
||||
saveStrain: function() {
|
||||
this.get('model').save().then(this.toggleProperty('isEditing'));
|
||||
}
|
||||
}
|
||||
});
|
Reference in a new issue