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 end else redirect_to login_path end end