Skip to content


Can't find correct path to scoped views #654

yfeldblum opened this Issue · 3 comments

3 participants


I have

# config/initializers/devise.rb
config.scoped_views = true

# config/routes.rb
namespace :actors do
  devise_for :account, :class_name => 'Actor', :module => 'devise'

I have the installed devise views in the directory app/views/actors/account/. However, Devise does not find these views. When I move them to the directory app/views/actors_account/ then Devise finds these views.

The problem is that Devise::Controllers::ScopedViews#render_with_scope tries first with devise_mapping.plural, which returns :actors_account. I would expect Devise to try first with 'actors/account' rather than :actors_account, because I would expect to the views to belong in app/views/actors/account.


Plataformatec member

Ensure namespaces has proper scoped views, closed by d8016ea


Thank you Jose!


Has this change been reverted since then? I'm still having this issue with the following routes:

  namespace :customer do
    devise_for :customer_users, :module => 'devise'

Devise looks for templates in app/views/customer_customer_users rather than in app/view/customer/customer_users.

I've solved this temporarily with this monkeypatch (changed devise_mapping.plural to devise_mapping.fullpath).

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.