0

The example code from doc:

# app/channels/web_notifications_channel.rb
class WebNotificationsChannel < ApplicationCable::Channel
  def subscribed
    stream_for current_user
  end
end

I have method current_user in ApplicationController. There error undefined method current_user id subscribed method of course becouse WebNotificationsChannel is not derived from ApplicationController. What doc mean? Or what I have missed?

fl-web
  • 462
  • 5
  • 16
  • 1
    I answered a similar question [here](http://stackoverflow.com/a/42452474/4587148) . – Sajan May 05 '17 at 11:30
  • Thanks. Some one also mention useful link to the doc but removed the comment. The link was: http://www.rubydoc.info/github/rails/actioncable/ActionCable/Connection/Base – fl-web May 05 '17 at 11:56

0 Answers0