       if Blog.settings.adminRole and not Roles.userIsInRole(Meteor.user(), Blog.settings.adminRole)
         return @redirect('/blog')
 
+      # Set up our own 'waitOn' here since IR does not atually wait on 'waitOn'
+      # (see https://github.com/EventedMind/iron-router/issues/265).
       Session.set 'postSlug', @params.slug
       @subscribe('singlePost', @params.slug).wait()

      if Blog.settings.blogIndexTemplate
        @template = Blog.settings.blogIndexTemplate

      if not Session.get('postLimit') and Blog.settings.pageSize
        Session.set 'postLimit', Blog.settings.pageSize

    waitOn: ->
      [ Meteor.subscribe 'posts', Session.get('postLimit')
        Meteor.subscribe 'authors' ]

    fastRender: true

    data: ->
      posts: Post.where
        published: true
      ,
        sort:
          publishedAt: -1

  #
  # Show Blog

    path: '/admin/blog/edit/:slug'

    waitOn: ->
      Meteor.subscribe 'authors'

    data: ->
