gitlab-org--gitlab-foss/lib/gitlab/gl_id.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
259 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-06-15 08:59:37 -04:00
module Gitlab
module GlId
def self.gl_id(user)
if user.present?
gl_id_from_id_value(user.id)
2016-06-15 08:59:37 -04:00
else
''
2016-06-15 08:59:37 -04:00
end
end
def self.gl_id_from_id_value(id)
"user-#{id}"
end
2016-06-15 08:59:37 -04:00
end
end