temp version to be used with Rails 4 and Mongoid4