Created
June 14, 2013 14:45
-
-
Save mitchlloyd/5782436 to your computer and use it in GitHub Desktop.
(Blog snippet) Example of ember auto save that won't work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.Document = DS.Model.extend | |
# some attributes here... | |
saveWhenDirty: (-> | |
@get('store').commit() if @get('isDirty') | |
).property('isDirty') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment