Skip to content

Instantly share code, notes, and snippets.

@sholden
Created March 19, 2013 21:28
Show Gist options
  • Save sholden/5200313 to your computer and use it in GitHub Desktop.
Save sholden/5200313 to your computer and use it in GitHub Desktop.
Mobile.SessionsNewController = Em.ObjectController.extend
startEditing: ->
@transaction = @get('store').transaction()
@set('content', @transaction.createRecord(Mobile.Session, {}))
stopEditing: ->
@transaction.rollback()
@transaction = null
save: ->
@transaction.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment