Skip to content

Instantly share code, notes, and snippets.

@chrism
Last active May 9, 2016 10:49
Show Gist options
  • Save chrism/9b8d0ea457279c434c6c2a7914181163 to your computer and use it in GitHub Desktop.
Save chrism/9b8d0ea457279c434c6c2a7914181163 to your computer and use it in GitHub Desktop.
Model using ember-api-actions
import DS from 'ember-data';
import Ember from 'ember';
import { memberAction, collectionAction } from 'ember-api-actions';
export default DS.Model.extend({
subset: collectionAction({ path: 'subset', type: 'get' })
});
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.createRecord('model').subset();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment