I have 2 associations
belongs_to :author
has_many :favorites
I'm wondering why this example works:
tire.search(load: {include: [:author, :comments]}, page: params[:page], per_page: 8) do
query { string params[:query], default_operator: "AND" } if params[:query].present?
filter :term, author_id: ['111']
sort { by :created_at, 'desc' }
end
And this one doesnt:
tire.search(load: {include: [:author, :comments]}, page: params[:page], per_page: 8) do
query { string params[:query], default_operator: "AND" } if params[:query].present?
filter :term, favorite_ids: ['567']
sort { by :created_at, 'desc' }
end
Can anyone help me?