Use to_gid_param for connection identifiers

This commit is contained in:
Jan Habermann 2015-11-18 12:15:18 +01:00
parent a74bcae30a
commit 952887a8bd
2 changed files with 6 additions and 2 deletions

@ -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

@ -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