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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
9e342fb0
Commit
9e342fb0
authored
Mar 09, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Destroy all related todos when removing a project
parent
500337c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
app/models/project.rb
app/models/project.rb
+1
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-0
No files found.
app/models/project.rb
View file @
9e342fb0
...
...
@@ -151,6 +151,7 @@ class Project < ActiveRecord::Base
has_many
:releases
,
dependent: :destroy
has_many
:lfs_objects_projects
,
dependent: :destroy
has_many
:lfs_objects
,
through: :lfs_objects_projects
has_many
:todos
,
dependent: :destroy
has_one
:import_data
,
dependent: :destroy
,
class_name:
"ProjectImportData"
...
...
spec/models/project_spec.rb
View file @
9e342fb0
...
...
@@ -68,6 +68,7 @@ describe Project, models: true do
it
{
is_expected
.
to
have_many
(
:runners
)
}
it
{
is_expected
.
to
have_many
(
:variables
)
}
it
{
is_expected
.
to
have_many
(
:triggers
)
}
it
{
is_expected
.
to
have_many
(
:todos
).
dependent
(
:destroy
)
}
end
describe
'modules'
do
...
...
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