summaryrefslogtreecommitdiff
path: root/app/models/deployment.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-15 15:09:50 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-15 15:09:50 +0200
commit6ace6d940a90e70f89392c3be7d9e538b6cec04c (patch)
tree203d6a0dc175ce23245ca5f60b56ee8e55657872 /app/models/deployment.rb
parenta4dc5f79bf281127fe5e4ace36ac4f7664701e0b (diff)
downloadgitlab-ce-6ace6d940a90e70f89392c3be7d9e538b6cec04c.tar.gz
Use validate and required for environment and project
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 030648470ee..e498ca96e3c 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -1,8 +1,8 @@
class Deployment < ActiveRecord::Base
include InternalId
- belongs_to :project, validate: true
- belongs_to :environment, validate: true
+ belongs_to :project, required: true, validate: true
+ belongs_to :environment, required: true, validate: true
belongs_to :user
belongs_to :deployable, polymorphic: true