debian-mirror-gitlab/lib/gitlab/database/dynamic_model_helpers.rb

17 lines
340 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module Gitlab
module Database
module DynamicModelHelpers
def define_batchable_model(table_name)
Class.new(ActiveRecord::Base) do
include EachBatch
self.table_name = table_name
self.inheritance_column = :_type_disabled
end
end
end
end
end