Answer the question
In order to leave comments, you need to log in
How to search in multiple models?
Hello everyone) I am implementing a search on the site using the searchkick gem. Everything works, but only for one model. How to search across multiple models? Thanks in advance.
______________________
<%= form_tag products_path, method: :get, class: "navbar-form navbar-right", role: "query" do %>
<%= text_field_tag :query, params[:query], class: "form-control ", id: "product_search", autocomplete: "off" %>
<%= submit_tag "Search", name: nil, class: "btn btn-default" %>
<% end %>
Answer the question
In order to leave comments, you need to log in
At least sometimes you go into the turnips of the gems you want and use the search there :)
https://github.com/ankane/searchkick/issues/257
There is the same in the docks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question