ryanb/private_pub — Issue #31: publish_to from controller (documentation)
Author: rubytastic
Created: 2012-01-29 13:43:58+00:00
State: open

Publish_to from a controller doesn't seem to work (in the readme it states this is possible although the docs are not that clear on further details ) Or I misinterpreted them.

IndexController#Index
PrivatePub.publish_to("/notification", "alert('blablabalabl');")

And in my /app/views/index.erb
<%= subscribe_to "/notification" %>

My understanding was this should publish to the /notifications and push the alert out, but that isn't the case.
It only seems to work on a create action wich is JS enabled.

@ryanb can you clarify how this works? thx for the great gem!