Created
April 27, 2016 14:59
-
-
Save kylefritz/9c13b39ad16196f27bd6efa3a2331e4e to your computer and use it in GitHub Desktop.
Websocket subscriptions with a "traditional" database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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