heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
24.02k stars 5.55k forks source link

Add support for namespaced Devise models in views path #5632

Open losingle opened 1 year ago

losingle commented 1 year ago

This commit modifies the add_devise_routes method to handle namespaced Devise models correctly. When the class_name includes a namespace (i.e., contains "::"), the namespace is used as the as option value for the devise_for route helper. This ensures that Devise looks for views in the correct directory corresponding to the namespace of the model. https://github.com/heartcombo/devise/blob/f6e73e5b5c8f519f4be29ac9069c6ed8a2343ce4/lib/devise/mapping.rb#L55