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
5cc9b17b
Commit
5cc9b17b
authored
May 15, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make `cross_project_reference?` less magical
parent
81a09bc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
app/models/concerns/referable.rb
app/models/concerns/referable.rb
+3
-4
No files found.
app/models/concerns/referable.rb
View file @
5cc9b17b
...
@@ -42,8 +42,7 @@ module Referable
...
@@ -42,8 +42,7 @@ module Referable
#
#
# Returns a Regexp
# Returns a Regexp
def
reference_pattern
def
reference_pattern
raise
NotImplementedError
,
raise
NotImplementedError
,
"
#{
self
}
does not implement
#{
__method__
}
"
%Q{
#{
self
}
does not implement "reference_pattern"}
end
end
end
end
...
@@ -53,10 +52,10 @@ module Referable
...
@@ -53,10 +52,10 @@ module Referable
#
#
# from_project - Refering Project object
# from_project - Refering Project object
def
cross_project_reference?
(
from_project
)
def
cross_project_reference?
(
from_project
)
if
Project
===
self
if
self
.
is_a?
(
Project
)
self
!=
from_project
self
!=
from_project
else
else
from_project
&&
project
&&
project
!=
from_project
from_project
&&
self
.
project
&&
self
.
project
!=
from_project
end
end
end
end
end
end
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