title: Rails Query Filtering by Comparing if Two Date Ranges Overlap
body: <p>I have 4 date params  <code>event_start, event_end, view_start, view_end</code>  </p>
  
  <p>How do I write  a Model.where() (or the appropriate active record query syntax) so that IF any date in-between <code>event_start</code> and <code>event_end</code> is the same as any date in-between <code>view_start</code> and <code>view_end</code> then that record is included?</p>
  
  <p><code>event_start</code> and <code>event_end</code> are columns in my table(properties on Model).</p>
  
  <p><code>view_start</code> and <code>view_end</code> are available in the params hash.</p>