I am using -
my route file looks like this:
Foo::Application.routes.draw do
devise_for :admins
root :to => "home#index"
authenticate :admin do
mount Simple::App, at: '/simple'
end
end
access under /simple needs to be authenticated.
However if not signed in , access to /simple/* will be redirect to /simple/admin/sign_in instead of just /admin/sign_in which creates a redirect loop.
Do I need to create a custom failure_app to correct this behavior?
Thanks!
Foo::Application.routes.draw do
devise_for(:admins)
root(to: 'home#index')
match('/simple/admins/sign_in' => redirect('/admins/sign_in'))
authenticate(:admin) do
mount(Simple::App, at: 'simple')
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With