Last active
May 9, 2016 10:49
-
-
Save chrism/9b8d0ea457279c434c6c2a7914181163 to your computer and use it in GitHub Desktop.
Model using ember-api-actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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