Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action cable gf #28

Merged
merged 7 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions app/channels/chat_channel.rb

This file was deleted.

11 changes: 11 additions & 0 deletions app/channels/social_channel.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class SocialChannel < ApplicationCable::Channel
def subscribed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic method in going about the group social channel.

social = Social.first
stream_for social
# stream_from "some_channel"
end

def unsubscribed
# Any cleanup needed when channel is unsubscribed
end
end