This commit is contained in:
Matthew Dillon 2015-11-10 15:42:20 -07:00
parent 48cd1f4f39
commit fbfbdf19d1
8 changed files with 54 additions and 37 deletions

View file

@ -7,4 +7,12 @@ export default Controller.extend(SaveModel, {
// Required for SaveModel mixin
fallbackRouteSave: 'protected.strains.show',
fallbackRouteCancel: 'protected.strains.show',
actions: {
addCharacteristic: function() {
return this.store.createRecord('measurement', {
characteristic: this.store.createRecord('characteristic', { sortOrder: -999 }),
});
},
},
});

View file

@ -2,6 +2,7 @@
protected/strains/strain-form
strain=model
speciesList=speciesList
add-characteristic=(action "addCharacteristic")
on-save=(action "save")
on-cancel=(action "cancel")
}}