cbeer / devise-guests

fake 'em until you make 'em
MIT License
130 stars 31 forks source link

undefined local variable or method `current_or_guest_user' #11

Closed bricedurand closed 3 years ago

bricedurand commented 11 years ago

Hello,

I don't know what I'm doing wrong but I get this error in my controllers and templates. I just added devise-guests to my Gemfile (version 0.3.2) and ran rails g devise_guests User.

What should I do to be able to access the current_or_guest_user method in my controller?

cbeer commented 11 years ago

I'll take a look. Did you run the devise generators first, and does Devise's #current_user work for you?

bricedurand commented 11 years ago

I have a running application with a Devise model called User and did use the devise generators. I'm using current_user everywhere in my app at the moment.

cbeer commented 11 years ago

Hm. What version of devise?

bricedurand commented 11 years ago

It's devise 3.0.0 with Rails 3.2

ismell commented 10 years ago

Where does your controller derive from? If it doesn't derive from ActionController:Base but instead derives off of ActionController::Metal then you won't get the helpers. To manually include the helpers add include DeviseGuests::Controllers::Helpers to your controller.

pacso commented 3 years ago

Closing this issue as stale. This is not an issue I'm currently aware of.