I just upgraded from ember.js RC7 to RC8 and found that a simple template (shown below) would throw a deprecated warning
\"Action handlers implemented di
You should define your actions inside the actions
hash in the controllers, views and routes to favour consistency.
Refer this https://github.com/emberjs/ember.js/pull/3091
Demo Fiddle
App.ApplicationController = Em.ObjectController.extend({
actions : {
// your actions here
}
});
It looks like I just needed to give the PR a look that changed this :)
In my controller I just needed to move the addPerson / deletePerson under actions like so
App.PeopleController = Ember.ArrayController.extend({
actions: {
addPerson: function() {
var person = {
firstName: this.get('firstName'),
lastName: this.get('lastName')
};
App.Person.add(person);
},
deletePerson: function(person) {
App.Person.remove(person);
}
}
});