method

add_subscriber

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: SubscriberMap
add_subscriber(channel, subscriber, on_success) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 11
      def add_subscriber(channel, subscriber, on_success)
        @sync.synchronize do
          new_channel = !@subscribers.key?(channel)

          @subscribers[channel] << subscriber

          if new_channel
            add_channel channel, on_success
          elsif on_success
            on_success.call
          end
        end
      end
Register or log in to add new notes.