Convert models to use new search includes mechanism
This commit is contained in:
@@ -9,7 +9,7 @@ class ArtistVersion < ApplicationRecord
|
||||
def search(params)
|
||||
q = super
|
||||
|
||||
q = q.search_attributes(params, :updater, :is_deleted, :is_banned, :artist_id, :name, :group_name)
|
||||
q = q.search_attributes(params, :is_deleted, :is_banned, :name, :group_name)
|
||||
|
||||
if params[:order] == "name"
|
||||
q = q.order("artist_versions.name").default_order
|
||||
@@ -103,6 +103,10 @@ class ArtistVersion < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def self.searchable_includes
|
||||
[:updater, :artist]
|
||||
end
|
||||
|
||||
def self.available_includes
|
||||
[:updater, :artist]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user