title: Generating Random Fixed Decimal in Rails
body: <p>I'm trying to generate random data in my rails application.
  But I am having a problem with decimal amount. I get an error
  saying bad value for range.</p>
  
  <pre><code>while $start &lt; $max
          $donation = Donation.new(member: Member.all.sample, amount:  [BigDecimal('5.00')...BigDecimal('200.00')].sample,
                                   date_give: Random.date_between(:today...Date.civil(2010,9,11)).to_date,
                                   donation_reason: ['tithes','offering','undisclosed','building-fund'].sample )
          $donation.save
          $start +=1
        end
  </code></pre>