i want to implement a search that goes through multiple models.
Found this stackoverflow question here that uses ransack and tried it right away. But I can't seem to get it to work.
in my controller :
def search
@quotes = Quote.search(title_cont: q).result
@books = Book.search(title_cont: q).result
@users = User.search(username_cont: q).result
end
routes
get '/search', to: 'application#search'
view
<%= form_tag search_path, method: :get do %>
<%= f.label :title_cont %>
<%= f.search_field :title_cont %>
<%= text_field_tag :q, nil %>
<% end %>