Redirect loop when user is signed in - RESOLVED

I’m trying to do challenge 45.1 in Newstand 1 but I can’t get it to work properly. I have tried to modify require_user with an if statement to check if current user is on login_path or signup_path and then redirect to root_path. It generates some kind of redirect loop. I need some help to figure out how to make it work and what I’m doing wrong.

 def require_user
    if current_user
      if login_path or signup_path
        redirect_to root_path
    	redirect_to login_path

This should probably be thrown in the general direction of an advisor

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.