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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2019-08-31 00:59:31 +0300
committerMichael Kozono <mkozono@gmail.com>2019-08-31 00:59:31 +0300
commit88c6423e4a45103cc480467bc8f412a48e1e0b55 (patch)
treec16f8134756de3acb3106fd9092ec0f73c8dc3b3 /app/models/concerns
parent1495a84cb7620f4d3d92b17146e760a523b1ede1 (diff)
parentd93b985df07ccf07541efef709edb8467e0f2955 (diff)
Merge branch 'remove-ignorable-column-concern' into 'master'
Remove dependency on IgnorableColumn concern Closes #66746 See merge request gitlab-org/gitlab-ce!32427
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/ignorable_column.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/app/models/concerns/ignorable_column.rb b/app/models/concerns/ignorable_column.rb
deleted file mode 100644
index 3bec44dc79b..00000000000
--- a/app/models/concerns/ignorable_column.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-# Module that can be included into a model to make it easier to ignore database
-# columns.
-#
-# Example:
-#
-# class User < ApplicationRecord
-# include IgnorableColumn
-#
-# ignore_column :updated_at
-# end
-#
-module IgnorableColumn
- extend ActiveSupport::Concern
-
- class_methods do
- def columns
- super.reject { |column| ignored_columns.include?(column.name) }
- end
-
- def ignored_columns
- @ignored_columns ||= Set.new
- end
-
- def ignore_column(*names)
- ignored_columns.merge(names.map(&:to_s))
- end
- end
-end