Use this to work with devise and actioncable.
Add this line to your application's Gemfile:
gem 'devise-actioncable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install devise-actioncable
Add the following line to your base Connection
glue_devise
The file should look like this
module ApplicationCable
class Connection < ActionCable::Connection::Base
glue_devise
identified_by :current_user
def connect
authenticate_user!
end
end
end
Bug reports and pull requests are welcome on GitHub at https://github.com/eritiro/devise-actioncable.
The gem is available as open source under the terms of the GNU license.