Skip to content

Instantly share code, notes, and snippets.

@tuckbick
Last active December 14, 2015 15:38
Show Gist options
  • Save tuckbick/5108857 to your computer and use it in GitHub Desktop.
Save tuckbick/5108857 to your computer and use it in GitHub Desktop.
ON THE SERVER:
// Party Model
module.exports = {
attributes: {
name: "STRING"
}
};
ON THE CLIENT
Mast.registerModel('Party', {
urlRoot: '/party',
})
Mast.registerComponent('Party', {
outlet: '#app',
template: '.party',
model: 'Party'
})
var data = serializeFormIntoObject()
var party = new Mast.components.Party();
party.set(data);
party.save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment