Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-15 15:05:10 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-15 15:05:10 +0300
commit9e487100b5e7ee7e226121fa353060d4e3dda8d4 (patch)
tree45534833848466d6a6f87fb0cd3d08ce4d695920 /app/models/deployment.rb
parent14433b341d5e8f0e55d984b478267f5df98f42ae (diff)
Validate project and environment instead of only requiring
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index cda922080cb..030648470ee 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -1,8 +1,8 @@
class Deployment < ActiveRecord::Base
include InternalId
- belongs_to :project, required: true
- belongs_to :environment, required: true
+ belongs_to :project, validate: true
+ belongs_to :environment, validate: true
belongs_to :user
belongs_to :deployable, polymorphic: true