I'm observing an Ember Data RecordArray like this:
myArray: function() {
return MyRecord.find();
}.property(),
isDirtyChanged: function() {
// Do something
}.observes('array.@each.isDirty');
I want to perform some operations on the particular record that fires the event. For example, if record 2 is modified:
MyRecord.find(2).set('my_property', 'some_value');
isDirtyChanged
will get called and do some stuff with the record. How can I get a reference to the record that calls the observer, not just the array as a whole?