Skip to content

Instantly share code, notes, and snippets.

@sholden
Created March 20, 2013 00:23
Show Gist options
  • Select an option

  • Save sholden/5201364 to your computer and use it in GitHub Desktop.

Select an option

Save sholden/5201364 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() if @transaction
@transaction = null
save: ->
@transaction.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment