Commit 5cc9b17b authored by Robert Speicher's avatar Robert Speicher
Browse files

Make `cross_project_reference?` less magical

parent 4f28f3ad1602
...@@ -42,8 +42,7 @@ def reference_prefix ...@@ -42,8 +42,7 @@ def reference_prefix
# #
# 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 @@ def reference_pattern ...@@ -53,10 +52,10 @@ def reference_pattern
# #
# 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment