title: How to search multiple models with ransack in liquid templates
body: <p>I am trying to implement ransack search for 3 models in a rails app that has liquid templates in the view. So far, I have been able to implement the search for just one model. 
  In my search controller, i have;</p>
  
  <pre><code>class SearchController &lt; ApplicationController
    def index
      @courses = Course.ransack(params[:q])
  
      # @teachers = Teacher.ransack(params[:q])
      # @articles = Article.ransack(params[:q])    
    end
  end
  </code></pre>
  
  <p>My search.html.liquid is empty since I want the search bar to show up in the navbar. So in my navbar.html.liquid, i included this;</p>
  
  <pre><code>&lt;form class="search" method="get" action="{{ request.url_helpers.courses_path }}"&gt;
    &lt;input type="text" placeholder="Search" name="q[title_cont]" value=""  /&gt;
    &lt;input type="submit" value="Search" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In my routes.rb, i have </p>
  
  <pre><code>    resources :search, only: [:index]
  </code></pre>
  
  <p>Like I mentioned earlier, the search works for the Course model but i would like to include the Teacher and Article model as well. For the Teacher model,  i would like to search for field "firstname_cont" and "title_cont" for the Article model. </p>
  
  <p>How do I combine the search for all 3 models in one search form that works well with liquid templates?</p>