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

Remove unecessary validate: true from belongs_to :project

See merge request gitlab-org/gitlab-ce!17166
This commit is contained in:
Kamil Trzciński 2018-02-20 09:55:00 +00:00
commit 7f5d984d5d
3 changed files with 8 additions and 3 deletions

View File

@ -1,8 +1,8 @@
class Deployment < ActiveRecord::Base
include InternalId
belongs_to :project, required: true, validate: true
belongs_to :environment, required: true, validate: true
belongs_to :project, required: true
belongs_to :environment, required: true
belongs_to :user
belongs_to :deployable, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations

View File

@ -4,7 +4,7 @@ class Environment < ActiveRecord::Base
NUMBERS = '0'..'9'
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

View File

@ -0,0 +1,5 @@
---
title: 'Remove unecessary validate: true from belongs_to :project'
merge_request:
author:
type: fixed