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 21 additions and 21 deletions
# frozen_string_literal: true
 
module Ci
class Pipeline < ActiveRecord::Base
class Pipeline < ApplicationRecord
extend Gitlab::Ci::Model
include HasStatus
include Importable
Loading
Loading
@@ -184,7 +184,7 @@ module Ci
 
scope :sort_by_merge_request_pipelines, -> do
sql = 'CASE ci_pipelines.source WHEN (?) THEN 0 ELSE 1 END, ci_pipelines.id DESC'
query = ActiveRecord::Base.send(:sanitize_sql_array, [sql, sources[:merge_request_event]]) # rubocop:disable GitlabSecurity/PublicSend
query = ApplicationRecord.send(:sanitize_sql_array, [sql, sources[:merge_request_event]]) # rubocop:disable GitlabSecurity/PublicSend
 
order(query)
end
Loading
Loading
# frozen_string_literal: true
 
module Ci
class PipelineChatData < ActiveRecord::Base
class PipelineChatData < ApplicationRecord
self.table_name = 'ci_pipeline_chat_data'
 
belongs_to :chat_name
Loading
Loading
# frozen_string_literal: true
 
module Ci
class PipelineSchedule < ActiveRecord::Base
class PipelineSchedule < ApplicationRecord
extend Gitlab::Ci::Model
include Importable
include IgnorableColumn
Loading
Loading
# frozen_string_literal: true
 
module Ci
class PipelineScheduleVariable < ActiveRecord::Base
class PipelineScheduleVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
 
Loading
Loading
# frozen_string_literal: true
 
module Ci
class PipelineVariable < ActiveRecord::Base
class PipelineVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
 
Loading
Loading
# frozen_string_literal: true
 
module Ci
class Runner < ActiveRecord::Base
class Runner < ApplicationRecord
extend Gitlab::Ci::Model
include Gitlab::SQL::Pattern
include IgnorableColumn
Loading
Loading
# frozen_string_literal: true
 
module Ci
class RunnerNamespace < ActiveRecord::Base
class RunnerNamespace < ApplicationRecord
extend Gitlab::Ci::Model
 
belongs_to :runner, inverse_of: :runner_namespaces, validate: true
Loading
Loading
# frozen_string_literal: true
 
module Ci
class RunnerProject < ActiveRecord::Base
class RunnerProject < ApplicationRecord
extend Gitlab::Ci::Model
 
belongs_to :runner, inverse_of: :runner_projects
Loading
Loading
# frozen_string_literal: true
 
module Ci
class Stage < ActiveRecord::Base
class Stage < ApplicationRecord
extend Gitlab::Ci::Model
include Importable
include HasStatus
Loading
Loading
# frozen_string_literal: true
 
module Ci
class Trigger < ActiveRecord::Base
class Trigger < ApplicationRecord
extend Gitlab::Ci::Model
include IgnorableColumn
include Presentable
Loading
Loading
# frozen_string_literal: true
 
module Ci
class TriggerRequest < ActiveRecord::Base
class TriggerRequest < ApplicationRecord
extend Gitlab::Ci::Model
 
belongs_to :trigger
Loading
Loading
# frozen_string_literal: true
 
module Ci
class Variable < ActiveRecord::Base
class Variable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
include Presentable
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module Clusters
module Applications
class CertManager < ActiveRecord::Base
class CertManager < ApplicationRecord
VERSION = 'v0.5.2'.freeze
 
self.table_name = 'clusters_applications_cert_managers'
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ require 'openssl'
 
module Clusters
module Applications
class Helm < ActiveRecord::Base
class Helm < ApplicationRecord
self.table_name = 'clusters_applications_helm'
 
attr_encrypted :ca_key,
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module Clusters
module Applications
class Ingress < ActiveRecord::Base
class Ingress < ApplicationRecord
VERSION = '1.1.2'.freeze
 
self.table_name = 'clusters_applications_ingress'
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module Clusters
module Applications
class Jupyter < ActiveRecord::Base
class Jupyter < ApplicationRecord
VERSION = '0.9-174bbd5'.freeze
 
self.table_name = 'clusters_applications_jupyter'
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module Clusters
module Applications
class Knative < ActiveRecord::Base
class Knative < ApplicationRecord
VERSION = '0.3.0'.freeze
REPOSITORY = 'https://storage.googleapis.com/triggermesh-charts'.freeze
METRICS_CONFIG = 'https://storage.googleapis.com/triggermesh-charts/istio-metrics.yaml'.freeze
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module Clusters
module Applications
class Prometheus < ActiveRecord::Base
class Prometheus < ApplicationRecord
include PrometheusAdapter
 
VERSION = '6.7.3'
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module Clusters
module Applications
class Runner < ActiveRecord::Base
class Runner < ApplicationRecord
VERSION = '0.3.0'.freeze
 
self.table_name = 'clusters_applications_runners'
Loading
Loading
# frozen_string_literal: true
 
module Clusters
class Cluster < ActiveRecord::Base
class Cluster < ApplicationRecord
include Presentable
include Gitlab::Utils::StrongMemoize
include FromUnion
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