Commit 7f5d984d authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'remove-unnecessary-validate-project' into 'master'

Remove unecessary validate: true from belongs_to :project

See merge request gitlab-org/gitlab-ce!17166
parents dc835fcc 2823d270
class Deployment < ActiveRecord::Base class Deployment < ActiveRecord::Base
include InternalId include InternalId
belongs_to :project, required: true, validate: true belongs_to :project, required: true
belongs_to :environment, required: true, validate: true belongs_to :environment, required: true
belongs_to :user belongs_to :user
belongs_to :deployable, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations belongs_to :deployable, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
......
...@@ -4,7 +4,7 @@ class Environment < ActiveRecord::Base ...@@ -4,7 +4,7 @@ class Environment < ActiveRecord::Base
NUMBERS = '0'..'9' NUMBERS = '0'..'9'
SUFFIX_CHARS = LETTERS.to_a + NUMBERS.to_a SUFFIX_CHARS = LETTERS.to_a + NUMBERS.to_a
belongs_to :project, required: true, validate: true belongs_to :project, required: true
has_many :deployments, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent has_many :deployments, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
......
---
title: 'Remove unecessary validate: true from belongs_to :project'
merge_request:
author:
type: fixed
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