Commit 2766226a authored by Vitali Tatarintev's avatar Vitali Tatarintev

Move InternalIdEnums to Enums::InternalId

Moves enums modules into a separate directory
parent 8dc5e1ed
# frozen_string_literal: true
module InternalIdEnums
module Enums
module InternalId
def self.usage_resources
# when adding new resource, make sure it doesn't conflict with EE usage_resources
{
......@@ -16,6 +17,7 @@ module InternalIdEnums
sprints: 9 # iterations
}
end
end
end
InternalIdEnums.prepend_if_ee('EE::InternalIdEnums')
Enums::InternalId.prepend_if_ee('EE::Enums::InternalId')
......@@ -21,7 +21,7 @@ class InternalId < ApplicationRecord
belongs_to :project
belongs_to :namespace
enum usage: ::InternalIdEnums.usage_resources
enum usage: Enums::InternalId.usage_resources
validates :usage, presence: true
......
# frozen_string_literal: true
module EE
module Enums
module InternalId
extend ActiveSupport::Concern
class_methods do
extend ::Gitlab::Utils::Override
override :usage_resources
def usage_resources
super.merge(requirements: 1000)
end
end
end
end
end
# frozen_string_literal: true
module EE
module InternalIdEnums
extend ActiveSupport::Concern
class_methods do
extend ::Gitlab::Utils::Override
override :usage_resources
def usage_resources
super.merge(requirements: 1000)
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment