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 ErrorTracking
class ProjectErrorTrackingSetting < ActiveRecord::Base
class ProjectErrorTrackingSetting < ApplicationRecord
include Gitlab::Utils::StrongMemoize
include ReactiveCaching
......
# frozen_string_literal: true
class Event < ActiveRecord::Base
class Event < ApplicationRecord
include Sortable
include IgnorableColumn
include FromUnion
......
# frozen_string_literal: true
class ForkNetwork < ActiveRecord::Base
class ForkNetwork < ApplicationRecord
belongs_to :root_project, class_name: 'Project'
has_many :fork_network_members
has_many :projects, through: :fork_network_members
......
# frozen_string_literal: true
class ForkNetworkMember < ActiveRecord::Base
class ForkNetworkMember < ApplicationRecord
belongs_to :fork_network
belongs_to :project
belongs_to :forked_from_project, class_name: 'Project'
......
# frozen_string_literal: true
class GpgKey < ActiveRecord::Base
class GpgKey < ApplicationRecord
KEY_PREFIX = '-----BEGIN PGP PUBLIC KEY BLOCK-----'.freeze
KEY_SUFFIX = '-----END PGP PUBLIC KEY BLOCK-----'.freeze
......
# frozen_string_literal: true
class GpgKeySubkey < ActiveRecord::Base
class GpgKeySubkey < ApplicationRecord
include ShaAttribute
sha_attribute :keyid
......
# frozen_string_literal: true
class GroupCustomAttribute < ActiveRecord::Base
class GroupCustomAttribute < ApplicationRecord
belongs_to :group
validates :group, :key, :value, presence: true
......
# frozen_string_literal: true
class WebHook < ActiveRecord::Base
class WebHook < ApplicationRecord
include Sortable
attr_encrypted :token,
......
# frozen_string_literal: true
class WebHookLog < ActiveRecord::Base
class WebHookLog < ApplicationRecord
belongs_to :web_hook
serialize :request_headers, Hash # rubocop:disable Cop/ActiveRecordSerialize
......
# frozen_string_literal: true
class Identity < ActiveRecord::Base
class Identity < ApplicationRecord
include Sortable
include CaseSensitivity
......
# frozen_string_literal: true
class Identity < ActiveRecord::Base
class Identity < ApplicationRecord
# This module and method are defined in a separate file to allow EE to
# redefine the `scopes` method before it is used in the `Identity` model.
module UniquenessScopes
......
# frozen_string_literal: true
class ImportExportUpload < ActiveRecord::Base
class ImportExportUpload < ApplicationRecord
include WithUploads
include ObjectStorage::BackgroundMove
......
......@@ -15,7 +15,7 @@
# In order to leverage InternalId for other usages, the idea is to
# * Add `usage` value to enum
# * (Optionally) add columns to `internal_ids` if needed for scope.
class InternalId < ActiveRecord::Base
class InternalId < ApplicationRecord
belongs_to :project
belongs_to :namespace
......
......@@ -2,7 +2,7 @@
require 'carrierwave/orm/activerecord'
class Issue < ActiveRecord::Base
class Issue < ApplicationRecord
include AtomicInternalId
include IidRoutes
include Issuable
......
# frozen_string_literal: true
class Issue::Metrics < ActiveRecord::Base
class Issue::Metrics < ApplicationRecord
belongs_to :issue
def record!
......
# frozen_string_literal: true
class IssueAssignee < ActiveRecord::Base
class IssueAssignee < ApplicationRecord
belongs_to :issue
belongs_to :assignee, class_name: "User", foreign_key: :user_id
end
......@@ -2,7 +2,7 @@
require 'digest/md5'
class Key < ActiveRecord::Base
class Key < ApplicationRecord
include AfterCommitQueue
include Sortable
......
# frozen_string_literal: true
class Label < ActiveRecord::Base
class Label < ApplicationRecord
include CacheMarkdownField
include Referable
include Subscribable
......
# frozen_string_literal: true
class LabelLink < ActiveRecord::Base
class LabelLink < ApplicationRecord
include Importable
belongs_to :target, polymorphic: true, inverse_of: :label_links # rubocop:disable Cop/PolymorphicAssociations
......
# frozen_string_literal: true
class LabelPriority < ActiveRecord::Base
class LabelPriority < ApplicationRecord
belongs_to :project
belongs_to :label
......
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