Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `id' for nil:NilClass in boxroom_current_user method #2

Open
zahid313 opened this issue Mar 14, 2021 · 0 comments
Open

Comments

@zahid313
Copy link

zahid313 commented Mar 14, 2021

I am using Rails 5.1 and ruby 2.3.1. I have followed readme instructions and set boxroom values in config/initializers/boxroom.rb


Boxroom.configure do |config|
    config.current_user_method = 'current_user' # a method in your application, which returns authenticated User, Boxroom's authentication is disabled
    config.sign_in_path = '/login' # pass string to redirect unauthenticated user to
    config.sign_out_path = '/logout' # pass string to redirect to after sign out, '/dashboard' for example. Or it could be sign out page of you main app
end

but I am getting error when i try to visit http://localhost:3000/boxroom. Error is undefined method `id' for nil:NilClass

Screenshot 2021-03-14 at 12 48 20 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant