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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
2dace367
Commit
2dace367
authored
Apr 15, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Note#cross_reference_exists? should be checking the noteable_type also
parent
e24ed47f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/models/note.rb
app/models/note.rb
+2
-2
No files found.
app/models/note.rb
View file @
2dace367
...
...
@@ -238,9 +238,9 @@ class Note < ActiveRecord::Base
def
cross_reference_exists?
(
noteable
,
mentioner
)
gfm_reference
=
mentioner_gfm_ref
(
noteable
,
mentioner
)
notes
=
if
noteable
.
is_a?
(
Commit
)
where
(
commit_id:
noteable
.
id
)
where
(
commit_id:
noteable
.
id
,
noteable_type:
'Commit'
)
else
where
(
noteable_id:
noteable
.
id
)
where
(
noteable_id:
noteable
.
id
,
noteable_type:
noteable
.
class
)
end
notes
.
where
(
'note like ?'
,
cross_reference_note_pattern
(
gfm_reference
)).
...
...
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