Updated library code for Mongoid 3.1.2

Updates for the following:

* Mongoid
* Grape