Skip to content

Instantly share code, notes, and snippets.

@jeremymarc
Created June 24, 2012 17:53
Show Gist options
  • Save jeremymarc/2984168 to your computer and use it in GitHub Desktop.
Save jeremymarc/2984168 to your computer and use it in GitHub Desktop.
Ajax Checkbox with Emberjs
App.AjaxCheckbox = Ember.Checkbox.extend({
'change': function(e) {
this._super(e);
this.get('parentView').submit();
}
});
@jeremymarc
Copy link
Author

I'm using it like this :
{{view App.AjaxCheckbox valueBinding="user.relocate"}}

But when the checkbox is checked, the value sent is false (and when the checkbox is unchecked, the value is checked)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment