Skip to content
Snippets Groups Projects
Commit 1c1c64c0 authored by Siddharth Asthana's avatar Siddharth Asthana
Browse files

Resolve Rails/BelongsTo rubocop offenses

Changelog: other
parent a582a43f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -319,13 +319,6 @@ Rails/ApplicationController:
- 'spec/controllers/concerns/continue_params_spec.rb'
- 'spec/lib/marginalia_spec.rb'
 
# Offense count: 3
# Cop supports --auto-correct.
Rails/BelongsTo:
Exclude:
- 'app/models/deployment.rb'
- 'app/models/environment.rb'
# Offense count: 155
# Cop supports --auto-correct.
Rails/ContentTag:
Loading
Loading
Loading
Loading
@@ -14,8 +14,8 @@ class Deployment < ApplicationRecord
 
ARCHIVABLE_OFFSET = 50_000
 
belongs_to :project, required: true
belongs_to :environment, required: true
belongs_to :project, optional: false
belongs_to :environment, optional: false
belongs_to :cluster, class_name: 'Clusters::Cluster', optional: true
belongs_to :user
belongs_to :deployable, polymorphic: true, optional: true # rubocop:disable Cop/PolymorphicAssociations
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ class Environment < ApplicationRecord
self.reactive_cache_hard_limit = 10.megabytes
self.reactive_cache_work_type = :external_dependency
 
belongs_to :project, required: true
belongs_to :project, optional: false
 
use_fast_destroy :all_deployments
nullify_if_blank :external_url
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