title: Making record available only to certain models in Rails 3
body: <p>I have a weird design question.  I have a model called Article, which has a bunch of attributes.  I also have an article search which does something like this:</p>
  
  <pre><code>Article.project_active.pending.search(params)
  </code></pre>
  
  <p>where search builds a query based on certain params.  I'd like to be able to limit results based on a user, that is, to have some articles have only a subset of users which can see them.
  For instance, I have an article A that I assign to writers 1,2,3,4.  I want them to be able to see A, but if User 5 searches, I don't want that user to see.  Also, I'd like to be able to assign some articles to ALL users.  </p>
  
  <p>Not sure if that was clear, but I'm looking for the best way to do this.  Should I just store a serialized array with a list of user_id's and have -1 in there if it's available to All?</p>
  
  <p>Thanks!</p>