Add mongoid support

Hmm, I see why you did that. I guess the if condition should be other way around, i.e. first check `Mongoid` and if not available use ActiveRecord, since `rails` is a hard gem dependency , first condition is bound to be always true.