Skip to content
Snippets Groups Projects
Verified Commit 013f7cd2 authored by Nick Thomas's avatar Nick Thomas
Browse files

Inherit from ApplicationRecord instead of ActiveRecord::Base

parent a74c3e6c
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
# 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'
Loading
Loading
# frozen_string_literal: true
 
module Clusters
class KubernetesNamespace < ActiveRecord::Base
class KubernetesNamespace < ApplicationRecord
include Gitlab::Kubernetes
 
self.table_name = 'clusters_kubernetes_namespaces'
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module Clusters
module Platforms
class Kubernetes < ActiveRecord::Base
class Kubernetes < ApplicationRecord
include Gitlab::Kubernetes
include ReactiveCaching
include EnumWithNil
Loading
Loading
# 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'
Loading
Loading
Loading
Loading
@@ -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'
Loading
Loading
# frozen_string_literal: true
 
class CommitStatus < ActiveRecord::Base
class CommitStatus < ApplicationRecord
include HasStatus
include Importable
include AfterCommitQueue
Loading
Loading
Loading
Loading
@@ -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
# ```
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@
#
# Example:
#
# class User < ActiveRecord::Base
# class User < ApplicationRecord
# include IgnorableColumn
#
# ignore_column :updated_at
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@
#
# Usage:
#
# class Issue < ActiveRecord::Base
# class Issue < ApplicationRecord
# include Participable
#
# # ...
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@
#
# Example of use:
#
# class Foo < ActiveRecord::Base
# class Foo < ApplicationRecord
# include ReactiveCaching
#
# self.reactive_cache_key = ->(thing) { ["foo", thing.id] }
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ module ShaAttribute
end
 
def database_exists?
ActiveRecord::Base.connection
ApplicationRecord.connection
 
true
rescue
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@
#
# Usage:
#
# class Milestone < ActiveRecord::Base
# class Milestone < ApplicationRecord
# strip_attributes :title
# end
#
Loading
Loading
# frozen_string_literal: true
 
class ContainerRepository < ActiveRecord::Base
class ContainerRepository < ApplicationRecord
include Gitlab::Utils::StrongMemoize
 
belongs_to :project
Loading
Loading
# frozen_string_literal: true
 
module ConversationalDevelopmentIndex
class Metric < ActiveRecord::Base
class Metric < ApplicationRecord
include Presentable
 
self.table_name = 'conversational_development_index_metrics'
Loading
Loading
# frozen_string_literal: true
 
class DeployKeysProject < ActiveRecord::Base
class DeployKeysProject < ApplicationRecord
belongs_to :project
belongs_to :deploy_key, inverse_of: :deploy_keys_projects
 
Loading
Loading
# frozen_string_literal: true
 
class DeployToken < ActiveRecord::Base
class DeployToken < ApplicationRecord
include Expirable
include TokenAuthenticatable
include PolicyActor
Loading
Loading
# frozen_string_literal: true
 
class Deployment < ActiveRecord::Base
class Deployment < ApplicationRecord
include AtomicInternalId
include IidRoutes
include AfterCommitQueue
Loading
Loading
# frozen_string_literal: true
 
class Email < ActiveRecord::Base
class Email < ApplicationRecord
include Sortable
include Gitlab::SQL::Pattern
 
Loading
Loading
# 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'
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment