What it does
This app uses no session and does not restrict access. Anyone can read your broadcasts and unless your user ids are random anyone can hide messages for any user.
Install the gem
Fire up Redis
UserRadio::App is a Rack app you can either embed into other apps or run standalone. In Rails you would add it to your routes like this:
scope '/broadcast' do match '(*path)' => UserRadio::App end
<div id="radio"></div> <script src="/path/to/user_radio/user_radio.js"></script> <script> $('#radio').userRadio('<current-user-id>'); </script>
Note that the domains for both apps must be the same so that the widget can hide messages using ajax.
Creating/updating the broadcast message
Start an irb session and enter the following:
UserRadio::App.database.new_broadcast '<your message>'