Module: Gitlab::Patch::GlobalId

Defined in:
lib/gitlab/patch/global_id.rb

Instance Method Summary collapse

Instance Method Details

#initialize(gid, options = {}) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/gitlab/patch/global_id.rb', line 8

def initialize(gid, options = {})
  super

  if deprecation = Gitlab::GlobalId::Deprecations.deprecation_for(model_name)
    @new_model_name = deprecation.new_model_name
  end
end

#model_nameObject


16
17
18
# File 'lib/gitlab/patch/global_id.rb', line 16

def model_name
  new_model_name || super
end