Short description and motivation.
Should set adapter as redis in development
development:
adapter: redis
url: redis://localhost:6379/1
<%= javascript_include_tag 'the_notify/cable', 'data-turbolinks-eval': 'false' %>
<%= stylesheet_link_tag 'the_notify/cable' %>
<%= link_to notifications_path, class: 'item', remote: true, id: 'notify_show' do %>
<i class="bell icon"></i>
<span id="notice_count" style="padding-left: 5px"><%= current_user.unread_count %></span>
<% end %>
# which model can receive notifications
class User < ApplicationRecord
include TheReceivable
end
class ApplicationController < ActionController::Base
include TheNotifyController
end
module ApplicationCable
class Connection < ActionCable::Connection::Base
prepend TheNotifyConnection
end
end
Add this line to your application's Gemfile:
gem 'the_notify'
And then execute:
$ bundle
Or install it yourself as:
$ gem install the_notify
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.