summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-03 11:23:21 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-03 11:23:21 +0000
commit7dc8b6b2045d84ff232731ef92f2cac916732753 (patch)
tree6ab9df705d3c3383b081f31952a98ba58957bcc3 /lib/api
parent25bb39225e073c451d76e7a7ddb9dedef8d43143 (diff)
parenta0586dbc165cc09422412149712a218938137308 (diff)
downloadgitlab-ce-7dc8b6b2045d84ff232731ef92f2cac916732753.tar.gz
Merge branch 'fwn-to-find-by-full-path' into 'master'
replace `find_with_namespace` with `find_by_full_path` See merge request !8949
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/helpers.rb2
-rw-r--r--lib/api/helpers/internal_helpers.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index a1d7b323f4f..eb5b947172a 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -45,7 +45,7 @@ module API
if id =~ /^\d+$/
Project.find_by(id: id)
else
- Project.find_with_namespace(id)
+ Project.find_by_full_path(id)
end
end
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb
index e8975eb57e0..080a6274957 100644
--- a/lib/api/helpers/internal_helpers.rb
+++ b/lib/api/helpers/internal_helpers.rb
@@ -30,7 +30,7 @@ module API
def wiki?
@wiki ||= project_path.end_with?('.wiki') &&
- !Project.find_with_namespace(project_path)
+ !Project.find_by_full_path(project_path)
end
def project
@@ -41,7 +41,7 @@ module API
# the wiki repository as well.
project_path.chomp!('.wiki') if wiki?
- Project.find_with_namespace(project_path)
+ Project.find_by_full_path(project_path)
end
end