Problem in controller_guard block
Closed this issue · 3 comments
shuargan commented
config.controller_guard = lambda { |current_user, request| current_user.admin? || Rails.env.development? }
Gettin a nil exception on current_user
undefined method `admin?' for nil:NilClass
Just updated the version and started to fail.
flyerhzm commented
@shuargan you need to define current_user
in your controller and make sure it's not nil.
shuargan commented
im using device, in my controllers is always define and never nil
flyerhzm commented
but it does complain current_user is nil.