Convert models to use new search includes mechanism
This commit is contained in:
@@ -4,13 +4,17 @@ class PixivUgoiraFrameData < ApplicationRecord
|
||||
serialize :data
|
||||
before_validation :normalize_data, on: :create
|
||||
|
||||
def self.searchable_includes
|
||||
[:post]
|
||||
end
|
||||
|
||||
def self.available_includes
|
||||
[:post]
|
||||
end
|
||||
|
||||
def self.search(params)
|
||||
q = super
|
||||
q = q.search_attributes(params, :post, :data, :content_type)
|
||||
q = q.search_attributes(params, :data, :content_type)
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user