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