This instance was upgraded to Heptapod 0.27.2 on 2021-12-08 at 22:00 UTC+1

Commit d7d59375 authored by Yorick Peterse's avatar Yorick Peterse Committed by Robert Speicher
Browse files

Removed arel_table receiver from search methods

We can just use "arel_table" in these cases instead of
"SomeClass.arel_table".
parent f9dbf0e2d1f0
......@@ -59,7 +59,7 @@ class Runner < ActiveRecord::Base
#
# 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)))
......
......@@ -41,7 +41,7 @@ class << self
#
# 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)))
......
......@@ -113,7 +113,7 @@ def build_discussion_id(type, id, line_code)
#
# Returns an ActiveRecord::Relation.
def search(query)
table = Note.arel_table
table = arel_table
pattern = "%#{query}%"
where(table[:note].matches(pattern))
......
......@@ -274,7 +274,7 @@ def active
#
# query - The search query as a String.
def search(query)
ptable = Project.arel_table
ptable = arel_table
ntable = Namespace.arel_table
pattern = "%#{query}%"
......
......@@ -121,7 +121,7 @@ class << self
#
# 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)))
......
......@@ -294,7 +294,7 @@ def filter(filter_name)
#
# Returns an ActiveRecord::Relation.
def search(query)
table = User.arel_table
table = arel_table
pattern = "%#{query}%"
where(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment