title: Rails 3 / Ruby: ActiveRecord Find method IN condition Array to Parameters single quote issue
body: <p>I created a method on a micropost model which takes an array of user_ids. In this method I use the following 'find' method to pull all posts for all of the users within the array. </p>
  
  <pre><code>find(:all, :conditions =&gt; ["user_id IN (?)", args.join(',')])
  </code></pre>
  
  <p>But when ActiveRecord generates the SQL for this query it surrounds the coma delimited list of Ids in single quotes. This causes the query to only pull posts for the first number within the single quotes instead of all the numbers.  </p>
  
  <pre><code>SELECT `microposts`.* FROM `microposts` WHERE (user_id IN ('3,4,5')) ORDER BY microposts.created_at DESC
  </code></pre>
  
  <p>The query should look like this to work correctly but I can't figure out how to get Ruby to convert the Array to a coma delimited list without the quotes, I know it has to be something simple and I am just missing it and can't find anything on Google that fixes this. All the posts I have found use the same .join(',') method to concert the Array.  </p>
  
  <pre><code>SELECT `microposts`.* FROM `microposts` WHERE (user_id IN (3,4,5)) ORDER BY microposts.created_at DESC
  </code></pre>
  
  <p>One more fact which migh assist you in figuring out my issue is the Array of ids which I am passing into the method is being built in the following manner. Not sure if this would affect things.</p>
  
  <pre><code>ids = Array.new
  ids.push(current_user.id)
  ids = ids + current_user.friends.map(&amp;:id)
  ids = ids + current_user.reverse_friends.map(&amp;:id)
  </code></pre>
  
  <p>Thanks in advance to the one who can help me get back to work ;) </p>