diff --git a/lib/action_cable/connection/identification.rb b/lib/action_cable/connection/identification.rb index 76cb7d5ea1..2d75ff8d6d 100644 --- a/lib/action_cable/connection/identification.rb +++ b/lib/action_cable/connection/identification.rb @@ -34,8 +34,8 @@ def connection_identifier private def connection_gid(ids) ids.map do |o| - if o.respond_to? :to_global_id - o.to_global_id.to_s + if o.respond_to? :to_gid_param + o.to_gid_param else o.to_s end diff --git a/test/stubs/user.rb b/test/stubs/user.rb index d033e6208b..a66b4f87d5 100644 --- a/test/stubs/user.rb +++ b/test/stubs/user.rb @@ -8,4 +8,8 @@ def initialize(name) def to_global_id GlobalID.new("User##{name}") end + + def to_gid_param + to_global_id.to_param + end end