uploads: fix /uploads listing search not working.
Upload#search was declared as an instance method instead of a class method.
This commit is contained in:
@@ -178,8 +178,7 @@ class Upload < ApplicationRecord
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
concerning :SearchMethods do
|
def self.search(params)
|
||||||
def search(params)
|
|
||||||
q = super
|
q = super
|
||||||
|
|
||||||
q = q.search_attributes(params, :uploader, :post, :source, :rating, :parent_id, :server, :md5, :server, :file_ext, :file_size, :image_width, :image_height, :referer_url)
|
q = q.search_attributes(params, :uploader, :post, :source, :rating, :parent_id, :server, :md5, :server, :file_ext, :file_size, :image_width, :image_height, :referer_url)
|
||||||
@@ -208,7 +207,6 @@ class Upload < ApplicationRecord
|
|||||||
|
|
||||||
q.apply_default_order(params)
|
q.apply_default_order(params)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def assign_rating_from_tags
|
def assign_rating_from_tags
|
||||||
if rating = PostQueryBuilder.new(tag_string).find_metatag(:rating)
|
if rating = PostQueryBuilder.new(tag_string).find_metatag(:rating)
|
||||||
|
|||||||
Reference in New Issue
Block a user