Use validate and required for environment and project
This commit is contained in:
parent
a4dc5f79bf
commit
6ace6d940a
|
@ -1,8 +1,8 @@
|
||||||
class Deployment < ActiveRecord::Base
|
class Deployment < ActiveRecord::Base
|
||||||
include InternalId
|
include InternalId
|
||||||
|
|
||||||
belongs_to :project, validate: true
|
belongs_to :project, required: true, validate: true
|
||||||
belongs_to :environment, validate: true
|
belongs_to :environment, required: true, validate: true
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :deployable, polymorphic: true
|
belongs_to :deployable, polymorphic: true
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Environment < ActiveRecord::Base
|
class Environment < ActiveRecord::Base
|
||||||
belongs_to :project, required: true
|
belongs_to :project, required: true, validate: true
|
||||||
|
|
||||||
has_many :deployments
|
has_many :deployments
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue