summaryrefslogtreecommitdiff
path: root/app/models/namespace.rb
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2015-12-15 00:53:52 -0200
committerGabriel Mazetto <gabriel@gitlab.com>2015-12-15 00:53:52 -0200
commitb5291f95996743067bbec5a32f9c6cf0d34b36c7 (patch)
tree9933fe5c9c224a175fb49fceff829b8b4441c970 /app/models/namespace.rb
parentd1f1c5c60bfd58f966671d7895c1ef612e8f8897 (diff)
downloadgitlab-ce-b5291f95996743067bbec5a32f9c6cf0d34b36c7.tar.gz
Fixed Rubocop offenses
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 1c4e101cc10..adafabbec07 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -45,7 +45,7 @@ class Namespace < ActiveRecord::Base
class << self
def by_path(path)
- where('lower(path) = :value', value: path.downcase).first
+ find_by('lower(path) = :value', value: path.downcase)
end
# Case insensetive search for namespace by path or name
@@ -148,6 +148,6 @@ class Namespace < ActiveRecord::Base
end
def find_fork_of(project)
- projects.joins(:forked_project_link).where('forked_project_links.forked_from_project_id = ?', project.id).first
+ projects.joins(:forked_project_link).find_by('forked_project_links.forked_from_project_id = ?', project.id)
end
end