Skip to content

Commit

Permalink
Merge pull request #259 from iezer/master
Browse files Browse the repository at this point in the history
Add Before and After hooks to Member and Collection Actions
  • Loading branch information
mike-north committed Nov 1, 2018
2 parents 26a9fed + 08df6a7 commit 613c71a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/dummy/app/models/fruit.js
@@ -1,5 +1,6 @@
// BEGIN-SNIPPET fruit-model
import DS from 'ember-data';

import { memberAction, collectionAction, serializeAndPush } from 'ember-api-actions';
import { assign } from '@ember/polyfills';

Expand All @@ -25,6 +26,7 @@ export default Model.extend({
eatAll: collectionAction({
path: 'doEatAll',
before: mergeAttributes,
after: serializeAndPush })
after: serializeAndPush
})
});
// END-SNIPPET

0 comments on commit 613c71a

Please sign in to comment.