I'm having a problem using Ember. When I change a model, its "isDirty" flag becomes true, which is what I expect.
However, after that its "isDirty" flag is true, even after I save that model.
Here's a minimal Rails + Ember project (so I can actually save the model) that shows the situation:
https://github.com/csterritt/etst
Am I doing something wrong? Is this expected behavior?
Thanks!
Edit: Turns out that, as Jeremy Green pointed out below, the "isDirty" flag works for Ember Data.
And, it works with the current Ember 1.0.0 (standard, not -latest) and Ember Data beta.
I was doing:
isClean: ( ->
! @get("isDirty")
).property("name", "age", "favorite_food")
Which was due to a misunderstanding on my part. Changing this to:
isClean: ( ->
! @get("isDirty")
).property("isDirty")
Works properly.
Unfortunately, this doesn't solve the Epf version's problem. Epf-ites?