app/controllers/polls_controller.rb
# Send belonging participants count of a poll to subscribers so they can update their data
Send belonging participants count of a poll to subscribers so they can update their data
Send belonging participants count of a poll to subscribers so they can update their data
def broadcast_participants_count
      poll = Poll.find(params[:id])
      if @poll.lecture == @lecture
        PollParticipantsCountChannel.broadcast_to(poll, get_serialized_participants_count)
      end
    end
def broadcast_participants_count poll = Poll . find ( params [ :id ] ) if @poll . lecture == @lecture PollParticipantsCountChannel . broadcast_to ( poll , get_serialized_participants_count ) end end
Send belonging participants count of a poll to subscribers so they can update their data
Send belonging participants count of a poll to subscribers so they can update their data
# broadcast update via ActionCable