Skip to content

Instantly share code, notes, and snippets.

@nathansobo
Created November 3, 2012 20:38
Show Gist options
  • Save nathansobo/4008638 to your computer and use it in GitHub Desktop.
Save nathansobo/4008638 to your computer and use it in GitHub Desktop.
Fetching all question data from the server
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