Convert models to use new search includes mechanism

This commit is contained in:
BrokenEagle
2020-07-19 03:42:51 +00:00
parent c141a358bd
commit c4009efccd
36 changed files with 208 additions and 125 deletions

View File

@@ -33,7 +33,7 @@ class ArtistCommentary < ApplicationRecord
def search(params)
q = super
q = q.search_attributes(params, :post, :original_title, :original_description, :translated_title, :translated_description)
q = q.search_attributes(params, :original_title, :original_description, :translated_title, :translated_description)
if params[:text_matches].present?
q = q.text_matches(params[:text_matches])
@@ -146,6 +146,10 @@ class ArtistCommentary < ApplicationRecord
extend SearchMethods
include VersionMethods
def self.searchable_includes
[:post]
end
def self.available_includes
[:post]
end