We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 939c9f8 commit b614c33Copy full SHA for b614c33
app/adapters/team.js
@@ -0,0 +1,8 @@
1
+import ApplicationAdapter from './application';
2
+
3
+export default ApplicationAdapter.extend({
4
+ queryRecord(store, type, query) {
5
+ let url = this.urlForFindRecord(query.team_id, 'team');
6
+ return this.ajax(url, 'GET');
7
+ },
8
+});
app/routes/team.js
@@ -19,7 +19,7 @@ export default Ember.Route.extend({
19
model(params) {
20
const { team_id } = params;
21
22
- return this.store.find('team', team_id).then(
+ return this.store.queryRecord('team', { team_id }).then(
23
(team) => {
24
params.team_id = team.get('id');
25
return Ember.RSVP.hash({
0 commit comments