title: Ruby on Rails: named scope with lambda and an array
body: <pre><code>named_scope :all_public, lambda { |users| 
         { :conditions =&gt;  ["visibility = ? || (visibility = ? &amp;&amp; user_id = ?)", Shared::PUBLIC, Shared::PRIVATE, users] }
       }
  </code></pre>
  
  <p>That works nice for one user, but is there a way to modify it to work where users is an array of user ids?</p>