f96q/kptboard

View on GitHub
app/channels/retrospectives_channel.rb

Summary

Maintainability
A
0 mins
Test Coverage
class RetrospectivesChannel < ApplicationChannel
  def open
    return unless authenticate_retrospective?
    retrospective = ApplicationController.render('channels/retrospective', assigns: { retrospective: @retrospective })
    broadcast_to(type: 'SET_RETROSPECTIVE', retrospective: JSON.parse(retrospective))
  end

  private

  def broadcast_class
    RetrospectivesChannel
  end
end