Is this a scope/routes problem? The current_user works in the user controller. Outside, in another controller/view, this returns nil. Even if the user is logged in, the user_signed_in? method returns false. I know I am missing something, just not able to point my finger. What is the right way to do this?
It works for me in other controllers. A wild guess: maybe the other controller needs: before_filter :authenticate_user!
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