summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-02-26 10:40:30 +0100
committerJames Lopez <james@jameslopez.es>2016-02-26 10:40:30 +0100
commitc401e8338b5cf4bf3593a2b6f7209c40d1b46c5b (patch)
tree455931fe1baf6715d0fbfd4d9dd9eed420a1b823 /lib
parent5c271ee95fe94656a2ea14b58d6e9fa664548edd (diff)
downloadgitlab-ce-c401e8338b5cf4bf3593a2b6f7209c40d1b46c5b.tar.gz
updated internal.rb and spec based on MR feedback
Diffstat (limited to 'lib')
-rw-r--r--lib/api/internal.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index c7705aeb59a..2200208b946 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -16,7 +16,7 @@ module API
#
helpers do
- def wiki
+ def wiki?
@wiki ||= params[:project].end_with?('.wiki') &&
!Project.find_with_namespace(params[:project])
end
@@ -38,12 +38,12 @@ module API
# Strip out the .wiki from the pathname before finding the
# project. This applies the correct project permissions to
# the wiki repository as well.
- project_path.chomp!('.wiki') if wiki
+ project_path.chomp!('.wiki') if wiki?
project = Project.find_with_namespace(project_path)
access =
- if wiki
+ if wiki?
Gitlab::GitAccessWiki.new(actor, project)
else
Gitlab::GitAccess.new(actor, project)