Skip to content

Instantly share code, notes, and snippets.

@knownasilya
Last active August 29, 2015 13:57
Show Gist options
  • Save knownasilya/9534827 to your computer and use it in GitHub Desktop.
Save knownasilya/9534827 to your computer and use it in GitHub Desktop.
  1. table populated from server
// table
{{#each content itemController='record'}}
...
{{/each}}
  1. user clicks [add record]
content.pushObject(recordInstance); // isNew
// instance is now in table
  1. user fills out instance data
  2. user hits save
// in RecordController
record.save();

Instance stays in table, and store.filter also adds the instance from the server.

@knownasilya
Copy link
Author

After removing content.pushObject(recordInstance), the record is still added to the table, but once saved a new one is created as well..

Maybe because the first one has no id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment