Use validate and required for environment and project

This commit is contained in:
Kamil Trzcinski 2016-06-15 15:09:50 +02:00
parent a4dc5f79bf
commit 6ace6d940a
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
class Environment < ActiveRecord::Base
belongs_to :project, required: true
belongs_to :project, required: true, validate: true
has_many :deployments