ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
864 stars 228 forks source link

PrivatePub.subscribe wildcard subscription #113

Open aparreno opened 9 years ago

aparreno commented 9 years ago

is this possible?

<%= subscribe_to "/#{current_user.company.id}/orders/#{current_user.entity.id}/*" %>

PrivatePub.subscribe('<%= "/#{current_user.company.id}/orders/#{current_user.entity.id}/*" %>', function (data, channel) { // TO DO });

when I use PrivatePub.subscribe with wildcards it doesn't work, I need to specify one single channel. PrivatePub.subscribe('<%= "/#{current_user.company.id}/orders/#{current_user.entity.id}/client_id" %>', function (data, channel) { // TO DO }); How can I handle javascript using wildcards?