| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1× 2× 7× 7× | import Action from 'ember-custom-actions/actions/action';
import deepMerge from 'lodash/merge';
export default function(path, options = {}) {
return function(payload = {}, actionOptions = {}) {
actionOptions.data = payload;
return Action.create({
id: path,
model: this,
options: deepMerge({}, options, actionOptions)
}).callAction();
};
}
|