Skip to content

Instantly share code, notes, and snippets.

@kylefritz
Created April 27, 2016 14:59
Show Gist options
  • Save kylefritz/9c13b39ad16196f27bd6efa3a2331e4e to your computer and use it in GitHub Desktop.
Save kylefritz/9c13b39ad16196f27bd6efa3a2331e4e to your computer and use it in GitHub Desktop.
Websocket subscriptions with a "traditional" database
class SomeApiController
def mutate_data_action
new_object = parse_params()
save_to_db(new_object)
Pusher.broadcast('channel_name', new_object.to_json)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment