Module: Gitlab::GlId

Defined in:
lib/gitlab/gl_id.rb

Class Method Summary collapse

Class Method Details

.gl_id(user) ⇒ Object


5
6
7
8
9
10
11
# File 'lib/gitlab/gl_id.rb', line 5

def self.gl_id(user)
  if user.present?
    gl_id_from_id_value(user.id)
  else
    ''
  end
end

.gl_id_from_id_value(id) ⇒ Object


13
14
15
# File 'lib/gitlab/gl_id.rb', line 13

def self.gl_id_from_id_value(id)
  "user-#{id}"
end