make it work with mongoid