title: Help writing a Ruby on Rails search
body: <p>I have a Note object, which has a <code>start_date</code> field (date, required) and an <code>end_date</code> field (date, optional).</p>
  
  <p>How can I write a search (in Ruby 1.9.2 &amp; Rails 3) that will find notes that meet these 2 conditions:</p>
  
  <ol>
  <li><code>end_date</code> field isn't empty</li>
  <li>parameter <code>input_date</code> is in the period between (<code>start_date</code> + 1 day) and <code>end_date</code></li>
  </ol>
  
  <p>Thanks for reading.</p>