-
Notifications
You must be signed in to change notification settings - Fork 1
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
Action cable gf #28
Conversation
user_id: user.id | ||
) | ||
|
||
SocialChannel.broadcast_to(channel, message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great formatting of the broadcasting the desired information.
|
||
user = User.find_by(name: params[:name]) | ||
channel = Social.first | ||
message = Message.create!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how you broke this down for readability.
@@ -0,0 +1,11 @@ | |||
class SocialChannel < ApplicationCable::Channel | |||
def subscribed |
There was a problem hiding this comment.
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.
@@ -0,0 +1,5 @@ | |||
class AddSocialsToMessages < ActiveRecord::Migration[5.2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this is all we need to get WebSockets live!
Features
resolves Create ActionCable channels and Message model for websockets #40
Concerns
Pre-Submittal Checklist
As a GIF, how does this PR make you feel?