0

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!

Steve
  • 4,446
  • 7
  • 35
  • 50
  • if you call somewhere current_or_guest_user (or any other method calling guest_user inside) - then it is called from that method. if not - would be very nice to see the controller code, not enough info for now – alony Dec 14 '11 at 11:54
  • @alony I figured out I was calling current_or_guest_user through another method sorry, thanks for replying – Steve Dec 15 '11 at 02:08

1 Answers1

1

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.

Steve
  • 4,446
  • 7
  • 35
  • 50