Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6ace6d94
Commit
6ace6d94
authored
Jun 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use validate and required for environment and project
parent
a4dc5f79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/deployment.rb
app/models/deployment.rb
+2
-2
app/models/environment.rb
app/models/environment.rb
+1
-1
No files found.
app/models/deployment.rb
View file @
6ace6d94
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
...
...
app/models/environment.rb
View file @
6ace6d94
class
Environment
<
ActiveRecord
::
Base
belongs_to
:project
,
required:
true
belongs_to
:project
,
required:
true
,
validate:
true
has_many
:deployments
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment