Skip to content

Commit

Permalink
Move NotificationChannel to lib so it isn't eager loaded in apps that…
Browse files Browse the repository at this point in the history
… don't include ActionCable

Fixes #392
  • Loading branch information
excid3 committed Jan 30, 2024
1 parent 11c1ce5 commit 713598d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 2.1.1

* Fix duplicate column in migrations.
* Add compatibility for apps that don't use ActionCable.

### 2.1.0

Expand Down
Empty file removed app/views/.keep
Empty file.
1 change: 1 addition & 0 deletions lib/noticed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def self.deprecator # :nodoc:
autoload :Coder, "noticed/coder"
autoload :DeliveryMethod, "noticed/delivery_method"
autoload :HasNotifications, "noticed/has_notifications"
autoload :NotificationChannel, "noticed/notification_channel"
autoload :RequiredOptions, "noticed/required_options"
autoload :Translation, "noticed/translation"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Noticed
class NotificationChannel < ::ApplicationCable::Channel
class NotificationChannel < ApplicationCable::Channel
def subscribed
stream_for current_user
end
Expand Down

0 comments on commit 713598d

Please sign in to comment.