[deprecations] Don't use ArrayController

This commit is contained in:
Piotr Sarnacki 2016-01-07 11:22:40 +01:00
parent 4b71704b1c
commit 39cf0b3044
5 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,3 @@
import Ember from 'ember';
export default Ember.ArrayController.extend();
export default Ember.Controller.extend();

View File

@ -1,20 +1,20 @@
import Ember from 'ember';
export default Ember.ArrayController.extend({
export default Ember.Controller.extend({
sortAscending: false,
sortProperties: ['number'],
repoController: Ember.inject.controller('repo'),
repoBinding: 'repoController.repo',
tabBinding: 'repoController.tab',
isLoadedBinding: 'content.isLoaded',
isLoadingBinding: 'content.isLoading',
isLoadedBinding: 'model.isLoaded',
isLoadingBinding: 'model.isLoading',
showMore() {
var id, number, type;
id = this.get('repo.id');
number = this.get('lastObject.number');
type = this.get('tab') === "builds" ? 'push' : 'pull_request';
return this.get('content').load(this.olderThanNumber(id, number, type));
return this.get('model').load(this.olderThanNumber(id, number, type));
},
displayShowMoreButton: function() {

View File

@ -1,6 +1,6 @@
import Ember from 'ember';
export default Ember.ArrayController.extend({
export default Ember.Controller.extend({
repoController: Ember.inject.controller('repo'),
lintUrl: function() {

View File

@ -1,6 +1,6 @@
{{#if content.isLoaded}}
{{#if model.isLoaded}}
<ul class="build-list">
{{#each controller as |build|}}
{{#each model as |build|}}
{{builds-item build=build}}
{{else}}
{{no-builds repo=noticeData isPR=displayPullRequests isBranch=displayBranches}}

View File

@ -14,13 +14,13 @@ window.deprecationWorkflow.config = {
{ handler: "log", matchMessage: "Usage of `typeKey` has been deprecated and will be removed in Ember Data 2.0. It has been replaced by `modelName` on the model class." },
{ handler: "log", matchMessage: "Using store.dematerializeRecord() has been deprecated since it was intended for private use only. You should use store.unloadRecord() instead." },
{ handler: "log", matchMessage: "Using the same function as getter and setter is deprecated." },
{ handler: "log", matchMessage: "`Ember.ArrayController` is deprecated." },
// TODO
{ handler: "silence", matchMessage: "Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy." },
{ handler: "silence", matchMessage: "The filter API will be moved into a plugin soon. To enable store.filter using an environment flag, or to use an alternative, you can visit the ember-data-filter addon page" },
{ handler: "silence", matchMessage: "Function#observesBefore is deprecated and will be removed in the near future." },
{ handler: "silence", matchMessage: "Ember.addBeforeObserver is deprecated and will be removed in the near future." },
{ handler: "silence", matchMessage: "`Ember.ArrayController` is deprecated." },
{ handler: "silence", matchMessage: "Ember.removeBeforeObserver is deprecated and will be removed in the near future." },
{ handler: "silence", matchMessage: "The default behavior of `shouldBackgroundReloadRecord` will change in Ember Data 2.0 to always return true. If you would like to preserve the current behavior please override `shouldBackgroundReloadRecord` in your adapter:application and return false." },
{ handler: "silence", matchMessage: "Using DS.Snapshot.get() is deprecated. Use .attr(), .belongsTo() or .hasMany() instead." },