Created
November 11, 2014 02:51
-
-
Save treygriffith/4b4383f6fd86b739bead to your computer and use it in GitHub Desktop.
Saving an Ember record with an async belongsTo relationship
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
comment = @store.createRecord('comment', { | |
author: @get('currentUser') | |
# snip | |
}) | |
comment.get('author').then -> | |
# comment.author is now resolved, safe to save | |
comment.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment