1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/action_cable/connection/identifier.rb

18 lines
428 B
Ruby
Raw Normal View History

module ActionCable
module Connection
module Identifier
def internal_redis_channel
"action_cable/#{connection_identifier}"
end
def connection_identifier
2015-06-21 13:39:43 -04:00
@connection_identifier ||= connection_gid identifiers.map { |id| instance_variable_get("@#{id}") }.compact
end
def connection_gid(ids)
2015-06-21 13:39:43 -04:00
ids.map { |o| o.to_global_id.to_s }.sort.join(":")
end
end
end
end