Skip to content

Instantly share code, notes, and snippets.

@superplussed
Created July 7, 2014 13:29
Show Gist options
  • Save superplussed/46c41cef4767b09f3c00 to your computer and use it in GitHub Desktop.
Save superplussed/46c41cef4767b09f3c00 to your computer and use it in GitHub Desktop.
class @SlideShowController extends RouteController
data: ->
slideNum:
@params.slideNum
module:
Module.findOne({slug: @params.moduleSlug})
lesson:
Lesson.findOne({slug: @params.lessonSlug})
waitOn: ->
Meteor.subscribe("Module")
Meteor.subscribe("Lesson")
Template.slideShow.slide = ->
if @lesson
Slide.findOne({lessonId: @lesson._id, orderNum: parseInt(@slideNum, 10)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment