Hello, I am wondering if it is possible to conditionally return one of two redirections based on the current user type. It appears that I cant pass a current_user third argument to the config.redirect_path. Is there any way I can access current_user from within this configuration?
Hello, I am wondering if it is possible to conditionally return one of two redirections based on the current user type. It appears that I cant pass a current_user third argument to the config.redirect_path. Is there any way I can access current_user from within this configuration?
I am hoping to do something like this.
config.redirect_path = lambda { |request, params, current_user| current_user.user_type_x ? '/path_one' : '/path_two' }