Convert models to use new search includes mechanism
This commit is contained in:
@@ -4,7 +4,7 @@ class ArtistCommentaryVersion < ApplicationRecord
|
||||
|
||||
def self.search(params)
|
||||
q = super
|
||||
q = q.search_attributes(params, :post, :updater, :original_title, :original_description, :translated_title, :translated_description)
|
||||
q = q.search_attributes(params, :original_title, :original_description, :translated_title, :translated_description)
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
|
||||
@@ -42,6 +42,10 @@ class ArtistCommentaryVersion < ApplicationRecord
|
||||
self[field].strip.empty? && (previous.nil? || previous[field].strip.empty?)
|
||||
end
|
||||
|
||||
def self.searchable_includes
|
||||
[:post, :updater]
|
||||
end
|
||||
|
||||
def self.available_includes
|
||||
[:post, :updater]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user