Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dynamic_model_helpers.rb « database « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 892f82917804853a19f7750984c6e82bfd354ab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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