Skip to content

Instantly share code, notes, and snippets.

@tomomura
Created July 17, 2015 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomomura/600735489a2038664ab8 to your computer and use it in GitHub Desktop.
Save tomomura/600735489a2038664ab8 to your computer and use it in GitHub Desktop.
class CommentRelayJob < ApplicationJob
def perform(comment)
ActionCable.server.broadcast "messages:#{comment.message_id}:comments",
comment: CommentsController.render(partial: 'comments/comment', locals: { comment: comment })
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment