Question

I have an app with guest user functionality in it. I'm trying to understand how my applicationcontroller guest_user methods are being called. I thought I would need a before_filter in the applicationcontroller in order for them to be called but when I comment out before_filter, the methods are still being called. Does applicationcontroller automatically call these? This seems like a simple question but I couldn't really find it spelled out anywhere. I used this guide to create my guest_user functionality https://github.com/plataformatec/devise/wiki/How-To:-Create-a-guest-user I'm using rails 3.1.1, formtastic 2.0.2, and devise 1.5.1. Thanks!

Was it helpful?

Solution

Problem solved, I was calling the current_or_guest_user method through another method in one of my controllers. It was my first time working with the ApplicationController so I was quick to assume that was responsible, I'll be more careful next time before I make a question. Thanks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top