title: Active Record find conditions as string
body: <p>i have some conditions to pass to a finder. The problem is that i don't want to pass in an usafety way. So imagine that i receive a hash:</p>
  
  <pre><code>hash = {:start_date=&gt;'2009-11-01',:end_date=&gt;'2010-01-23'}
  </code></pre>
  
  <p>i would like to pass it to my finder like:</p>
  
  <pre><code>Model.find(:all,:conditions=&gt;"created &gt; '#{start_date}' and created &lt; '#{end_date}'")
  </code></pre>
  
  <p>The problem is that it is unsafe and i'm exposed to SQL injection problems. My question is, how would be the best way to compose this condition? </p>
  
  <p>I want to do it dynamically. For example, i'm doing today like:</p>
  
  <pre><code>find_condition = ['created &gt; ? and created &lt; ?','2009-10-01','2010-01-01']
  Model.find(:all,:conditions=&gt;find_condition)
  </code></pre>