Skip to content

Instantly share code, notes, and snippets.

@frankV
Created July 3, 2013 17:01
Show Gist options
  • Save frankV/5920519 to your computer and use it in GitHub Desktop.
Save frankV/5920519 to your computer and use it in GitHub Desktop.
/*global Todos DS Ember */
'use strict';
Todos.Todo = DS.Model.extend({
title: DS.attr('string'),
isCompleted: DS.attr('boolean'),
todoDidChange: function () {
Ember.run.once(this, function () {
this.get('store').commit();
});
}.observes('isCompleted', 'title')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment