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 d451f78 commit 939c9f8Copy full SHA for 939c9f8
app/adapters/user.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.user_id, 'user');
6
+ return this.ajax(url, 'GET');
7
+ },
8
+});
app/routes/user.js
@@ -12,7 +12,7 @@ export default Ember.Route.extend({
12
13
model(params) {
14
const { user_id } = params;
15
- return this.store.find('user', user_id).then(
+ return this.store.queryRecord('user', { user_id }).then(
16
(user) => {
17
params.user_id = user.get('id');
18
return Ember.RSVP.hash({
0 commit comments