just need to swap ``role_class.superclass.to_s == "ActiveRecord::Base"`` with ``role_class.connected?`` to make it Mongoid friendly