Skip to content

Commit 5e0f3bc

Browse files
committed
Merge pull request #221 from Turbo87/ember-update
Resolved remaining Ember 1.13 deprecations
2 parents e739a51 + 2720b03 commit 5e0f3bc

File tree

14 files changed

+14
-14
lines changed

14 files changed

+14
-14
lines changed

app/controllers/crate/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default Ember.Controller.extend({
4242
return DS.PromiseArray.create({
4343
promise: this.get('currentVersion.authors').then((authors) => {
4444
var ret = authors.slice();
45-
var others = this.store.metadataFor('user');
45+
var others = authors.get('meta');
4646
for (var i = 0; i < others.names.length; i++) {
4747
ret.push({name: others.names[i]});
4848
}

app/controllers/crate/reverse-dependencies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export default Ember.Controller.extend(PaginationMixin, {
99
per_page: 10,
1010

1111
totalItems: computed('model', function() {
12-
return this.store.metadataFor('dependency').total;
12+
return this.get('model.meta').total;
1313
})
1414
});

app/controllers/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1414
showSortBy: false,
1515

1616
totalItems: computed('model', function() {
17-
return this.store.metadataFor('crate').total;
17+
return this.get('model.meta').total;
1818
}),
1919

2020
currentSortBy: computed('sort', function() {

app/controllers/keyword/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1212
showSortBy: false,
1313

1414
totalItems: computed('model', function() {
15-
return this.store.metadataFor('crate').total;
15+
return this.get('model.meta').total;
1616
}),
1717

1818
currentSortBy: computed('sort', function() {

app/controllers/keywords.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1212
showSortBy: false,
1313

1414
totalItems: computed('model', function() {
15-
return this.store.metadataFor('keyword').total;
15+
return this.get('model.meta').total;
1616
}),
1717

1818
currentSortBy: computed('sort', function() {

app/controllers/me/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1313
showSortBy: false,
1414

1515
totalItems: computed('model', function() {
16-
return this.store.metadataFor('crate').total;
16+
return this.get('model.meta').total;
1717
}),
1818

1919
currentSortBy: computed('sort', function() {

app/controllers/me/following.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1313
showSortBy: false,
1414

1515
totalItems: computed('model', function() {
16-
return this.store.metadataFor('crate').total;
16+
return this.get('model.meta').total;
1717
}),
1818

1919
currentSortBy: computed('sort', function() {

app/controllers/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export default Ember.Controller.extend(PaginationMixin, {
1414
}),
1515

1616
totalItems: computed('model', function() {
17-
return this.store.metadataFor('crate').total;
17+
return this.get('model.meta').total;
1818
})
1919
});

app/routes/crate/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default Ember.Route.extend({
5858
return controller.get('model.version_downloads');
5959
}
6060
}).then((downloads) => {
61-
var meta = controller.store.metadataFor('version_download');
61+
var meta = downloads.get('meta');
6262
controller.set('fetchingDownloads', false);
6363
controller.send('renderChart', downloads, meta.extra_downloads);
6464
});

app/routes/keyword/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default Ember.Route.extend({
1010
afterModel(keyword, transition) {
1111
var params = transition.queryParams;
1212
params.keyword = keyword.get('keyword');
13-
return this.store.find('crate', params).then((array) => {
13+
return this.store.query('crate', params).then((array) => {
1414
if (this.controllerFor('keyword/index')) {
1515
this.controllerFor('keyword/index').set('model', array);
1616
}

app/routes/keywords.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export default Ember.Route.extend({
77
},
88

99
model(params) {
10-
return this.store.find('keyword', params);
10+
return this.store.query('keyword', params);
1111
},
1212
});

app/routes/me/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default Ember.Route.extend(AuthenticatedRoute, {
99

1010
model(params) {
1111
params.user_id = this.session.get('currentUser.id');
12-
return this.store.find('crate', params);
12+
return this.store.query('crate', params);
1313
},
1414
});
1515

app/routes/me/following.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default Ember.Route.extend(AuthenticatedRoute, {
99

1010
model(params) {
1111
params.following = 1;
12-
return this.store.find('crate', params);
12+
return this.store.query('crate', params);
1313
},
1414
});
1515

app/routes/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export default Ember.Route.extend({
99
},
1010

1111
model(params) {
12-
return this.store.find('crate', params);
12+
return this.store.query('crate', params);
1313
},
1414
});

0 commit comments

Comments
 (0)