Removed arel_table receiver from search methods

We can just use "arel_table" in these cases instead of
"SomeClass.arel_table".
This commit is contained in:
Yorick Peterse
2016-03-11 15:25:23 -05:00
committed by Robert Speicher
parent 0ab9571ad7
commit d7d5937531
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ module Ci
#
# Returns an ActiveRecord::Relation.
def self.search(query)
t = Ci::Runner.arel_table
t = arel_table
pattern = "%#{query}%"
where(t[:token].matches(pattern).or(t[:description].matches(pattern)))
+1 -1
View File
@@ -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)))
+1 -1
View File
@@ -113,7 +113,7 @@ class Note < ActiveRecord::Base
#
# Returns an ActiveRecord::Relation.
def search(query)
table = Note.arel_table
table = arel_table
pattern = "%#{query}%"
where(table[:note].matches(pattern))
+1 -1
View File
@@ -274,7 +274,7 @@ class Project < ActiveRecord::Base
#
# query - The search query as a String.
def search(query)
ptable = Project.arel_table
ptable = arel_table
ntable = Namespace.arel_table
pattern = "%#{query}%"
+1 -1
View File
@@ -121,7 +121,7 @@ class Snippet < ActiveRecord::Base
#
# Returns an ActiveRecord::Relation.
def search(query)
t = Snippet.arel_table
t = arel_table
pattern = "%#{query}%"
where(t[:title].matches(pattern).or(t[:file_name].matches(pattern)))
+1 -1
View File
@@ -294,7 +294,7 @@ class User < ActiveRecord::Base
#
# Returns an ActiveRecord::Relation.
def search(query)
table = User.arel_table
table = arel_table
pattern = "%#{query}%"
where(