Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
302d2588
Commit
302d2588
authored
7 years ago
by
http://jneen.net/
Browse files
Options
Download
Email Patches
Plain Diff
special case inc_namespace_with_associations for MergeRequest
since it needs to reference `target_project`.
parent
4fd89ca3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
app/models/merge_request.rb
app/models/merge_request.rb
+2
-0
No files found.
app/models/merge_request.rb
View file @
302d2588
...
...
@@ -125,6 +125,8 @@ class MergeRequest < ActiveRecord::Base
scope
:unassigned
,
->
{
where
(
"assignee_id IS NULL"
)
}
scope
:assigned_to
,
->
(
u
)
{
where
(
assignee_id:
u
.
id
)}
scope
:inc_namespace_with_associations
,
->
{
includes
(
target_project:
[
:namespace
,
:route
])
}
participant
:assignee
after_save
:keep_around_commit
...
...
This diff is collapsed.
Click to expand it.
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