ebryn / ember-model

A lightweight model library for Ember.js
MIT License
524 stars 159 forks source link

change `dirtyAttributes.pushObject` to `dirtyAttributes.addObject` #348

Closed scottmessinger closed 10 years ago

scottmessinger commented 10 years ago

This prevents the same attributes from appearing multiple times in the dirtyAttributes array

I'm not sure if this needs a test -- let me know and I'll add one.

dwickern commented 10 years ago

I noticed this too. I don't think there is any functional impact since removeObject will remove all instances of the key but it did confuse me.

ebryn commented 10 years ago

It would be nice to have a test that would fail prior to this change to make sure we don't regress.

scottmessinger commented 10 years ago

Thanks for the response! I'll go ahead and add a test.

ebryn commented 10 years ago

@scottmessinger ping

scottmessinger commented 10 years ago

Thanks for the ping. I haven't gotten a chance to do it, but I'm planning to.