Skip to content

Instantly share code, notes, and snippets.

@regedarek
Created November 8, 2012 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save regedarek/6f056457208d99fcbfd1 to your computer and use it in GitHub Desktop.
Save regedarek/6f056457208d99fcbfd1 to your computer and use it in GitHub Desktop.
addCategory: function(event) {
event.preventDefault();
var self = this;
var useCategoryId = $('select[id=use_category_id]').val();
this.model.set('category_id', parseInt(useCategoryId,10));
this.model.save({ success: self.addedCategory });
},
addedCategory: function() {
console.log('success');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment