Created
November 3, 2012 20:38
-
-
Save nathansobo/4008638 to your computer and use it in GitHub Desktop.
Fetching all question data from the server
This file contains 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
setQuestionId: (questionId) -> | |
questionRelations = [Question, Answer, Ranking, Vote].map (r) -> r.where({questionId}) | |
Monarch.Remote.Server.fetch([User, questionRelations...]) | |
.onSuccess => @setQuestion(Question.find(questionId)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment