Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-03-04 14:01:21 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-03-11 23:25:23 +0300
commitd7d5937531350283f6cbd68dead5750227e6d962 (patch)
treeef6c2aaede0877b85bfcb7ac832f23a88b6ea786 /app/models/group.rb
parent0ab9571ad791c608ec258426edb195ae95b45220 (diff)
Removed arel_table receiver from search methods
We can just use "arel_table" in these cases instead of "SomeClass.arel_table".
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index bfeddf8b4d2..afbc2922013 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -41,7 +41,7 @@ class Group < Namespace
#
# Returns an ActiveRecord::Relation.
def search(query)
- table = Group.arel_table
+ table = Namespace.arel_table
pattern = "%#{query}%"
where(table[:name].matches(pattern).or(table[:path].matches(pattern)))