title: private pub - publish from controller never works
body: <p>Trying to implement a simple notification system based on private pub ( something like juggernaut ). by Ryan bates see: <a href="http://railscasts.com/episodes/316-private-pub" rel="nofollow">http://railscasts.com/episodes/316-private-pub</a></p>
  
  <p><strong>Problem: Im unable to send a message true private pub from a controller</strong></p>
  
  <p>Some code:</p>
  
  <p>inside header.haml</p>
  
  <pre><code>= subscribe_to "/notifications"
  = javascript_include_tag APP_CONFIG['faye'] ( includes JS wich is correct )
  </code></pre>
  
  <p>inside application.coffee</p>
  
  <pre><code>PrivatePub.subscribe "/notifications", (data, channel) -&gt;
  alert data
  </code></pre>
  
  <p>inside any controller action</p>
  
  <pre><code>PrivatePub.publish_to("/notifications", "some test data to send")
  </code></pre>
  
  <p>-</p>
  
  <p>This does not work, wanted behavior is that the "some test data to send " is being displayed in an alert on any page I'm on in the rails app. Ive tried several times the tutorial on rails cast, cloned the private pub example code repo, but nothing works sending from a controller.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Anyone could help provide a example of private pub app in a repro publishing to a channel from a controller?</p>
  
  <p><strong>UPDATE2</strong>
  It seems as long as there is a create action it works, but without a create action it is not.
  I would like to be able to just send some data from anywhere in a controller to the app with a javascript command. Like  " send private pub message load popup " for example, what do i Missi n above code that makes this not work?</p>