Closed oscarlaf03 closed 3 years ago
Are you showing the real code here? Nothing in pundit should conflict with Devise.
@Linuus thanks for looking into this I just realized I am hitting my StuffController without first creating an user thus all the devise methods fail
application_controller.rb
application_policy.rb
stuff_policy.rb
stuff_controller.rb Note that there is no
Stuff
model just aStuffController
thus I am using a "Headless Policy"Error message
all the above produces
.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/devise-4.5.0/lib/devise/controllers/helpers.rb:143
Question
What am I doing wrong here?, Why is there a nil for
env
on the devise gem?This error goes away when I remove
authorize
from my stuff_controller.rb fileSo I suspects I am not configuring something properly regarding pundit and devise but I don't know what
Thanks a lot for the help