Commit 6ace6d94 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Use validate and required for environment and project

parent a4dc5f79
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
......
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment