models: drop various unused #named methods.
This commit is contained in:
@@ -464,10 +464,6 @@ class Artist < ApplicationRecord
|
||||
end
|
||||
|
||||
module SearchMethods
|
||||
def named(name)
|
||||
where(name: normalize_name(name))
|
||||
end
|
||||
|
||||
def any_other_name_matches(regex)
|
||||
where(id: Artist.from("unnest(other_names) AS other_name").where("other_name ~ ?", regex))
|
||||
end
|
||||
|
||||
@@ -930,10 +930,6 @@ class Tag < ApplicationRecord
|
||||
where("tags.name LIKE ? ESCAPE E'\\\\'", normalize_name(name).to_escaped_for_sql_like)
|
||||
end
|
||||
|
||||
def named(name)
|
||||
where("tags.name = ?", TagAlias.to_aliased([name]).join(""))
|
||||
end
|
||||
|
||||
def search(params)
|
||||
q = super
|
||||
|
||||
|
||||
@@ -742,10 +742,6 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
module SearchMethods
|
||||
def named(name)
|
||||
where("lower(name) = ?", name)
|
||||
end
|
||||
|
||||
def admins
|
||||
where("level = ?", Levels::ADMIN)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user