debian-mirror-gitlab/lib/gitlab/gl_id.rb

18 lines
259 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
module Gitlab
module GlId
def self.gl_id(user)
if user.present?
2018-10-15 14:42:47 +05:30
gl_id_from_id_value(user.id)
else
2018-10-15 14:42:47 +05:30
''
end
end
2018-10-15 14:42:47 +05:30
def self.gl_id_from_id_value(id)
"user-#{id}"
end
end
end