We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddaf3b2 commit 386ab89Copy full SHA for 386ab89
actioncable/lib/action_cable/channel/test_case.rb
@@ -64,17 +64,13 @@ def transmit(cable_message)
64
end
65
66
def connection_identifier
67
- unless defined? @connection_identifier
68
- @connection_identifier = connection_gid identifiers.filter_map { |id| send(id.to_sym) if id }
69
- end
70
-
71
- @connection_identifier
+ @connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
72
73
74
private
75
def connection_gid(ids)
76
ids.map do |o|
77
- if o.respond_to? :to_gid_param
+ if o.respond_to?(:to_gid_param)
78
o.to_gid_param
79
else
80
o.to_s
0 commit comments