devise root authenticated in a different namespace

16 views
Skip to first unread message

jennas

unread,
Nov 2, 2016, 2:15:05 PM11/2/16
to Devise

I know that for authenticated users in devise, you do something like:

authenticated :user do
  root 'secret#index', as: :authenticated_root
end


But what if your secret is in a different namespace? I tried the following and it doesn't work:

authenticated :user do
  root namespace: :auth, controller: :secret, action: :index, as: :authenticated_root
end


nor this:

namespace auth do
    authenticated :user do
        root 'secret#index', as: :authenticated_root
    end
end


nor this:

authenticated :user do
    namespace auth do
        root 'secret#index', as: :authenticated_root
    end
end

TIA!
Reply all
Reply to author
Forward
0 new messages