updated generator and model to use mongoid