Sorry for stupid question, but what exactly are scopes in devise? Problem I run into is that I want to add sign_out method to my controller, and I can't do it because config.sign_out_all_scopes is set to true by default, so changing it to false would help, but I don't understand what this config actually does. It looks like being true it will sign out all :admins or all :users by signing out one, but it doesn't make sense to me. Is "scope" actually a user? What exactly will change if I toggle this option? Thanks a lot in advance.
Devise allows you to separate your users into different "scopes" such as "admin" and "member", the effect of this is that you get a set of routes, controllers and views for each scope.
A user can belong to multiple scopes and sign in to any/all of them at any time - so when the option sign_out_all_scopes
is true, signing out as any scope will sign out all of that users currently signed in scopes.
Regarding your specific question - why are you defining your own sign out method? Devise provides one for you. If you want to modify the sign out method make sure you follow the instructions for properly extending the devise controllers.
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