Can't we add a router_name field directly to the mapping object and use find_scope as we have been using in other places? You should be able to do this:

    scope = Devise::Mapping.find_scope!(obj)
    Devise.mappings[scope].router_name

Wdyt?