title: How to set Data type for Hash in rails (Mongoid)
body: <p>I have a mongoDB scheme something like this</p>
  
  <pre><code>new Schema({
   productDetail: [ {
                  productYear:     String,
                  productNumber:   String,
                  productType:     [ { type: Schema.ObjectId, ref: 'type' } ]
                } ],
   created_at: string
              )}
  </code></pre>
  
  <p>Trying the same in Rails and mongoid I could not add child elements and data types to the Hash object</p>
  
  <pre><code>class Product
  include Mongoid::Document
  has_many :types
   field :productDetail, type: Hash
   field :created_at, type: string
  end
  </code></pre>
  
  <p>is that even possible?</p>