Sha256: c967fdafda74d5f384a3e6a48dfd251aad12cc198208847db4707200d5b80e26

Contents?: true

Size: 687 Bytes

Versions: 20

Compression:

Stored size: 687 Bytes

Contents

module ActionCable
  module SubscriptionAdapter
    module ChannelPrefix # :nodoc:
      def broadcast(channel, payload)
        channel = channel_with_prefix(channel)
        super
      end

      def subscribe(channel, callback, success_callback = nil)
        channel = channel_with_prefix(channel)
        super
      end

      def unsubscribe(channel, callback)
        channel = channel_with_prefix(channel)
        super
      end

      private
        # Returns the channel name, including channel_prefix specified in cable.yml
        def channel_with_prefix(channel)
          [@server.config.cable[:channel_prefix], channel].compact.join(":")
        end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
actioncable-5.1.7 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.7.rc1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.6.2 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.6.1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.6 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.5 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.5.rc1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.4 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.4.rc1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.3 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.3.rc3 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.3.rc2 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.3.rc1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.2 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.2.rc1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.0 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.0.rc2 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.0.rc1 lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable-5.1.0.beta1 lib/action_cable/subscription_adapter/channel_prefix.rb