I noticed that the gem only works when I am logged in. I am using devise.
Maybe we can add a hint that one needs to modify connection.rb or add something to the initializer of the gem?
connection.rb :
module ApplicationCable
class Connection < ActionCable::Connection::Base
identified_by :current_user
def connect
self.current_user = find_verified_user
end
private
def find_verified_user
if verified_user = env['warden'].user
p verified_user
verified_user
else
p verified_user
reject_unauthorized_connection
end
end
end
end
I noticed that the gem only works when I am logged in. I am using devise. Maybe we can add a hint that one needs to modify
connection.rb
or add something to the initializer of the gem?connection.rb
: