title: Rails How to get 2 objects using join and where on ransack?
body: <p>i'm trying to use ransack to get two associated objects</p>
  
  <p>relationship</p>
  
  <blockquote>
    <ol>
    <li>Proback belongs to user</li>
    <li>Proback belongs to product</li>
    <li>Product has_many probacks </li>
    <li>User has_many probacks</li>
    </ol>
  </blockquote>
  
  <p>but the logs show:</p>
  
  <blockquote>
    <p>ActiveRecord::PreparedStatementInvalid (wrong number of bind variables
    (1 for 2) in: products.id = ? and users.id = ?)</p>
  </blockquote>
  
  <pre><code> @q = Proback.joins(:product,:user).where('products.id = ? and users.id =? ', @product.id,@user.id).ransack(params[:q])
  </code></pre>
  
  <p>someone please can spare a hint?</p>