Created
June 24, 2012 17:53
-
-
Save jeremymarc/2984168 to your computer and use it in GitHub Desktop.
Ajax Checkbox with Emberjs
This file contains 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.AjaxCheckbox = Ember.Checkbox.extend({ | |
'change': function(e) { | |
this._super(e); | |
this.get('parentView').submit(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)