summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-08-08 14:22:26 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-08-08 14:22:26 +0200
commit74d12b6b4708164fe14c6019874384615ed3c711 (patch)
tree94dae13e7a9ca460431fc8cf699cbbb25aead746
parent91030230545a199a86c2742600a7a2e68ef75c98 (diff)
downloadgitlab-ce-fix/remove-legacy-ci-static-model.tar.gz
Remove legacy Ci::StaticModel we do not use anymorefix/remove-legacy-ci-static-model
-rw-r--r--lib/ci/static_model.rb49
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/ci/static_model.rb b/lib/ci/static_model.rb
deleted file mode 100644
index bb2bdbed495..00000000000
--- a/lib/ci/static_model.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# Provides an ActiveRecord-like interface to a model whose data is not persisted to a database.
-module Ci
- module StaticModel
- extend ActiveSupport::Concern
-
- module ClassMethods
- # Used by ActiveRecord's polymorphic association to set object_id
- def primary_key
- 'id'
- end
-
- # Used by ActiveRecord's polymorphic association to set object_type
- def base_class
- self
- end
- end
-
- # Used by AR for fetching attributes
- #
- # Pass it along if we respond to it.
- def [](key)
- send(key) if respond_to?(key)
- end
-
- def to_param
- id
- end
-
- def new_record?
- false
- end
-
- def persisted?
- false
- end
-
- def destroyed?
- false
- end
-
- def ==(other)
- if other.is_a? ::Ci::StaticModel
- id == other.id
- else
- super
- end
- end
- end
-end