title: rails - :joins sanitizing/substitution
body: <p>is it possible to specify parameters for :joins similar way as for :conditions?</p>
  
  <p>here is an example (sql code is irrelevant)</p>
  
  <pre><code>named_scope :threads, {
    :joins =&gt; [" LEFT JOIN groups_messages gm ON messages.id=gm.message_id AND gm.group_id IN (?) ",@group_ids_array], 
    :conditions =&gt; ["creator_id=? AND messages.id IN (?)", current_user_id, @message_ids_array]
  }
  </code></pre>
  
  <p>in this example parameters for :conditions would get inserted properly, but for :joins i would get an error </p>
  
  <pre><code> Association named '  LEFT JOIN groups_messages gm ON messages.id=gm.message_id and gm.group_id IN (?) ' was not found; perhaps you misspelled it?
  </code></pre>
  
  <p>what function substitutes parameters for :conditions?</p>