Fixes some Ember Deprecations for 1.13:

- Remove ArrayController
- Remove {{view}} from templates
- Replace many cases of needs: [‘controller’] with inject
- Enable Ember Legacy Views
This commit is contained in:
Robin Ward
2016-10-20 13:26:41 -04:00
parent 2a61cc8c88
commit bf91532260
50 changed files with 255 additions and 336 deletions

View File

@@ -2,7 +2,6 @@ import { ajax } from 'discourse/lib/ajax';
import PreloadStore from 'preload-store';
const Backup = Discourse.Model.extend({
destroy() {
return ajax("/admin/backups/" + this.get("filename"), { type: "DELETE" });
},
@@ -13,11 +12,9 @@ const Backup = Discourse.Model.extend({
data: { client_id: window.MessageBus.clientId }
});
}
});
Backup.reopenClass({
find() {
return PreloadStore.getAndRemove("backups", () => ajax("/admin/backups.json"))
.then(backups => backups.map(backup => Backup.create(backup)));