Skip to content

Instantly share code, notes, and snippets.

@balinterdi
Last active December 15, 2015 06:09
Show Gist options
  • Save balinterdi/5213779 to your computer and use it in GitHub Desktop.
Save balinterdi/5213779 to your computer and use it in GitHub Desktop.
Trying to find a way to resubmit a form with a model that has become invalid. The transaction cannot be reused and the dirty model cannot be moved to another transaction since it is dirty.
becameInvalid: ->
@get('transaction').remove(this)
transaction = App.store.transaction()
transaction.add(this) # => Uncaught Error: assertion failed: Once a record has changed, you cannot move it into a different transaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment