debian-mirror-gitlab/lib/gitlab/database/dynamic_model_helpers.rb
2020-08-09 17:44:08 +05:30

16 lines
340 B
Ruby

# 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