title: How to use ActiveRecord "where" query to check overlap between two arrays
body: <p>I have a Meetings class which contains a 'days' attribute, which I've serialized into an Array.  The method I used to store an array is described here:</p>
  
  <p>Link- <a href="https://stackoverflow.com/questions/8097750/array-attribute-for-ruby-model">Array Attribute for Ruby Model</a></p>
  
  <p>So for example, running:</p>
  
  <pre><code>Meeting.first.days
  </code></pre>
  
  <p>might return: </p>
  
  <pre><code>["Monday", "Tuesday", "Wednesday"]
  </code></pre>
  
  <p>Here's an example of an entire Meeting object:</p>
  
  <pre><code>#&lt;Meeting id: 7, address: "10 Canal Street", neighborhood: "Tribeca", building_name: "Yale Club", name: "Alumni Luncheon", start_time: "00:00", end_time: "00:35", notes: "", days: ["Tuesday", "Wednesday", "Thursday"], zip_code: 10055, special_interest: nil, meeting_type: nil, area: "Manhattan", latitude: 40.8104529, longitude: -73.9922805, created_at: "2013-09-29 22:02:29", updated_at: "2013-09-29 22:02:29"&gt;
  </code></pre>
  
  <p>I have a search form with checkboxes corresponding to the days of the week, so users can check which days they want to search for a meeting.  For instance, a user might want to see any meetings whose days include Monday.</p>
  
  <p>My expectation is for the search to return any Meeting object with "Monday" included in its 'days' array.  But I'm having trouble using ActiveRecord to filter these meetings.  So far I have:</p>
  
  <pre><code>meetings = Meeting.order(:start_time)
  meetings = meetings.where("days in (?)", days_params)
  </code></pre>
  
  <p>But this keeps filtering the 'meetings' variable down to 0 results.  I could be wrong but I think the problem is that this only works if 'days' is not an array, i.e. if I compare a string with an array then it might work.  Since I need to compare the union of two arrays, anyone have an idea?</p>