0

I try to stream the current_user.id, but I get only id = 1...

class NotificationsChannel < ApplicationCable::Channel
  def subscribed
    stream_from "notification:#{current_user.id}"
  end
end


Console Log

NotificationsChannel is transmitting the subscription confirmation
NotificationsChannel is streaming from notification:1

The user has id = 56 but insted getting notification:56, I get notification:1

How can I solve it? Thank you

Snake Sanders
  • 2,641
  • 2
  • 31
  • 42
Mr McDonald
  • 453
  • 7
  • 16

0 Answers0