Skip to content

Instantly share code, notes, and snippets.

@Pomeha
Created March 7, 2018 07:54
Show Gist options
  • Save Pomeha/0d1b406d3b64d8210678b993a7ab0f44 to your computer and use it in GitHub Desktop.
Save Pomeha/0d1b406d3b64d8210678b993a7ab0f44 to your computer and use it in GitHub Desktop.
def hello(data)
author = role_checker(current_user)
create_comment.(
author,
author.recommendations.find(data['recommendation_id']),
data['message']
)
ActionCable.server.broadcast "client_#{current_user.client.id}_channel", {
status: :recieved
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment