https://avo.cool logo
Authentication
# general
r
I'm setting up Avo on a new Rails install, with Devise for authentication. I've set the the current_user_method = :current_user, but when I navigate to /avo it treats me as if I'm logged in even though I'm not. Any ideas what I could be doing wrong?
l
Hello there!
r
hello
l
It's possible that you're mounting Avo routes for unauthenticated users?
r
ah, ok I see – I need to scroll down a bit more in the authentication guide. Thanks!
l
Copy code
authenticate :user, ->(user) { user.is_admin? } do 
     mount Avo::Engine, at: Avo.configuration.root_path 
end
r
yep, got it working
thanks!
l
I'm glad to hear that! Anytime!