summaryrefslogtreecommitdiff
path: root/lib/constraints
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-04-24 12:38:09 +0200
committerBob Van Landuyt <bob@gitlab.com>2017-05-01 11:14:24 +0200
commit12735eefcd7876435cd05f35a9f26bfe2836e09f (patch)
treea433db37dd74431960817038f86d9ffa8bef9c66 /lib/constraints
parentea8e86dac856fdf6545e020df346533231379b93 (diff)
downloadgitlab-ce-12735eefcd7876435cd05f35a9f26bfe2836e09f.tar.gz
Minor style adjustments
Diffstat (limited to 'lib/constraints')
-rw-r--r--lib/constraints/project_url_constrainer.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/constraints/project_url_constrainer.rb b/lib/constraints/project_url_constrainer.rb
index 064e1bd78e3..d0ce2caffff 100644
--- a/lib/constraints/project_url_constrainer.rb
+++ b/lib/constraints/project_url_constrainer.rb
@@ -4,9 +4,7 @@ class ProjectUrlConstrainer
project_path = request.params[:project_id] || request.params[:id]
full_path = namespace_path + '/' + project_path
- unless DynamicPathValidator.valid?(full_path)
- return false
- end
+ return false unless DynamicPathValidator.valid?(full_path)
Project.find_by_full_path(full_path).present?
end