Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for namespaced Devise models in views path #5632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

losingle
Copy link

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.

@scoped_path = options[:as] ? "#{options[:as]}/#{name}" : name.to_s

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant