Commit 2a24b25d authored by Nick Thomas's avatar Nick Thomas
Browse files

Inherit from ApplicationRecord instead of ActiveRecord::Base

parent c4f8d7e5ecfd
# frozen_string_literal: true
module Clusters
class Group < ActiveRecord::Base
class Group < ApplicationRecord
self.table_name = 'cluster_groups'
belongs_to :cluster, class_name: 'Clusters::Cluster'
......
# frozen_string_literal: true
module Clusters
class KubernetesNamespace < ActiveRecord::Base
class KubernetesNamespace < ApplicationRecord
include Gitlab::Kubernetes
self.table_name = 'clusters_kubernetes_namespaces'
......
......@@ -2,7 +2,7 @@
module Clusters
module Platforms
class Kubernetes < ActiveRecord::Base
class Kubernetes < ApplicationRecord
include Gitlab::Kubernetes
include ReactiveCaching
include EnumWithNil
......
# frozen_string_literal: true
module Clusters
class Project < ActiveRecord::Base
class Project < ApplicationRecord
self.table_name = 'cluster_projects'
belongs_to :cluster, class_name: 'Clusters::Cluster'
......
......@@ -2,7 +2,7 @@
module Clusters
module Providers
class Gcp < ActiveRecord::Base
class Gcp < ApplicationRecord
self.table_name = 'cluster_providers_gcp'
belongs_to :cluster, inverse_of: :provider_gcp, class_name: 'Clusters::Cluster'
......
# frozen_string_literal: true
class CommitStatus < ActiveRecord::Base
class CommitStatus < ApplicationRecord
include HasStatus
include Importable
include AfterCommitQueue
......
......@@ -7,7 +7,7 @@
#
# For example, let's generate internal ids for Issue per Project:
# ```
# class Issue < ActiveRecord::Base
# class Issue < ApplicationRecord
# has_internal_id :iid, scope: :project, init: ->(s) { s.project.issues.maximum(:iid) }
# end
# ```
......
......@@ -5,7 +5,7 @@
#
# Example:
#
# class User < ActiveRecord::Base
# class User < ApplicationRecord
# include IgnorableColumn
#
# ignore_column :updated_at
......
......@@ -7,7 +7,7 @@
#
# Usage:
#
# class Issue < ActiveRecord::Base
# class Issue < ApplicationRecord
# include Participable
#
# # ...
......
......@@ -7,7 +7,7 @@
#
# Example of use:
#
# class Foo < ActiveRecord::Base
# class Foo < ApplicationRecord
# include ReactiveCaching
#
# self.reactive_cache_key = ->(thing) { ["foo", thing.id] }
......
......@@ -39,7 +39,7 @@ def validate_binary_column_exists!(name)
end
def database_exists?
ActiveRecord::Base.connection
ApplicationRecord.connection
true
rescue
......
......@@ -6,7 +6,7 @@
#
# Usage:
#
# class Milestone < ActiveRecord::Base
# class Milestone < ApplicationRecord
# strip_attributes :title
# end
#
......
# frozen_string_literal: true
class ContainerRepository < ActiveRecord::Base
class ContainerRepository < ApplicationRecord
include Gitlab::Utils::StrongMemoize
belongs_to :project
......
# frozen_string_literal: true
module ConversationalDevelopmentIndex
class Metric < ActiveRecord::Base
class Metric < ApplicationRecord
include Presentable
self.table_name = 'conversational_development_index_metrics'
......
# frozen_string_literal: true
class DeployKeysProject < ActiveRecord::Base
class DeployKeysProject < ApplicationRecord
belongs_to :project
belongs_to :deploy_key, inverse_of: :deploy_keys_projects
......
# frozen_string_literal: true
class DeployToken < ActiveRecord::Base
class DeployToken < ApplicationRecord
include Expirable
include TokenAuthenticatable
include PolicyActor
......
# frozen_string_literal: true
class Deployment < ActiveRecord::Base
class Deployment < ApplicationRecord
include AtomicInternalId
include IidRoutes
include AfterCommitQueue
......
# frozen_string_literal: true
class Email < ActiveRecord::Base
class Email < ApplicationRecord
include Sortable
include Gitlab::SQL::Pattern
......
# frozen_string_literal: true
class Environment < ActiveRecord::Base
class Environment < ApplicationRecord
include Gitlab::Utils::StrongMemoize
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'
......
......@@ -2,7 +2,7 @@
# Placeholder class for model that is implemented in EE
# It reserves '&' as a reference prefix, but the table does not exists in CE
class Epic < ActiveRecord::Base
class Epic < ApplicationRecord
def self.link_reference_pattern
nil
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment