Revert "Swapped the check order for ActiveRecord and Mongoid."

This reverts commit 84a63d042a808d90e09c99652c69d7c657ddc034.