Skip to content

Instantly share code, notes, and snippets.

@janusch
Last active December 19, 2015 19:29
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 janusch/6006670 to your computer and use it in GitHub Desktop.
Save janusch/6006670 to your computer and use it in GitHub Desktop.
What is the correct way to save records in Embah?
//1.
WeekPresence.get('transaction').commit();
//2.
WeekPresences.pushObject(WeekPresence);
//3.
var WeekPresence = Haps.WeekPresence.createRecord({
monday: this.set('model.monday', value),
tuesday: this.get('model.tuesday'),
/...
});
//4.
App.store.commit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment