title: Storing Time Stamp as Number Mongoid
body: <p>I'm new to Mongoid. In my model file, I've created a field with data type BigDecimal. I want to store time stamp in it. Below is the model that I'm using:</p>
  
  <pre><code>class Test
    include Mongoid::Document
    field :time_stamp, type: BigDecimal
  end
  </code></pre>
  
  <p>And Below is the code that I'm using to create a document:</p>
  
  <pre><code>aTime = "Wed Apr 24 09:48:38 +0000 2013"
  timest = aTime.to_time.to_i
  Test.create({time_stamp: timest})
  </code></pre>
  
  <p>I see that the time_stamp is stored as String in the database. Can anybody direct me to store the timestamp as number in DB so that I could perform some operations on it. Thanks in advance.</p>