Searching Multiple Models with Ransack Rails 4
问题 I'm trying to figure out how to search multiple models with Ransack. The goal is to have the search form in my shared header. I'm using a combination of their documentation, an old rails-cast, SO questions, and some code a friend shared with me. Right now I think it works, although I'm not sure because I can't get the results to show on my index page. First, I created a search controller: class SearchController < ApplicationController def index q = params[:q] @items = Item.search(name_cont: q