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 ErrorTracking
class ProjectErrorTrackingSetting < ActiveRecord::Base
class ProjectErrorTrackingSetting < ApplicationRecord
include Gitlab::Utils::StrongMemoize
include ReactiveCaching
 
Loading
Loading
# frozen_string_literal: true
 
class Event < ActiveRecord::Base
class Event < ApplicationRecord
include Sortable
include IgnorableColumn
include FromUnion
Loading
Loading
# 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
Loading
Loading
# 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'
Loading
Loading
# 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
 
Loading
Loading
# frozen_string_literal: true
 
class GpgKeySubkey < ActiveRecord::Base
class GpgKeySubkey < ApplicationRecord
include ShaAttribute
 
sha_attribute :keyid
Loading
Loading
# frozen_string_literal: true
 
class GroupCustomAttribute < ActiveRecord::Base
class GroupCustomAttribute < ApplicationRecord
belongs_to :group
 
validates :group, :key, :value, presence: true
Loading
Loading
# frozen_string_literal: true
 
class WebHook < ActiveRecord::Base
class WebHook < ApplicationRecord
include Sortable
 
attr_encrypted :token,
Loading
Loading
# frozen_string_literal: true
 
class WebHookLog < ActiveRecord::Base
class WebHookLog < ApplicationRecord
belongs_to :web_hook
 
serialize :request_headers, Hash # rubocop:disable Cop/ActiveRecordSerialize
Loading
Loading
# frozen_string_literal: true
 
class Identity < ActiveRecord::Base
class Identity < ApplicationRecord
include Sortable
include CaseSensitivity
 
Loading
Loading
# 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
Loading
Loading
# frozen_string_literal: true
 
class ImportExportUpload < ActiveRecord::Base
class ImportExportUpload < ApplicationRecord
include WithUploads
include ObjectStorage::BackgroundMove
 
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'carrierwave/orm/activerecord'
 
class Issue < ActiveRecord::Base
class Issue < ApplicationRecord
include AtomicInternalId
include IidRoutes
include Issuable
Loading
Loading
# frozen_string_literal: true
 
class Issue::Metrics < ActiveRecord::Base
class Issue::Metrics < ApplicationRecord
belongs_to :issue
 
def record!
Loading
Loading
# 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
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'digest/md5'
 
class Key < ActiveRecord::Base
class Key < ApplicationRecord
include AfterCommitQueue
include Sortable
 
Loading
Loading
# frozen_string_literal: true
 
class Label < ActiveRecord::Base
class Label < ApplicationRecord
include CacheMarkdownField
include Referable
include Subscribable
Loading
Loading
# 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
Loading
Loading
# frozen_string_literal: true
 
class LabelPriority < ActiveRecord::Base
class LabelPriority < ApplicationRecord
belongs_to :project
belongs_to :label
 
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