You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: terms_controller.rb
    path of file: ./repos/gitlabhq/app/controllers/users
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Users
  class TermsController < ApplicationController
    include InternalRedirect
    include
    
    def redirect_path
      redirect_to_path = safe_redirect_path(params[:redirect]) || safe_redirect_path_for_url(request.referer)

      if redirect_to_path &&
          excluded_redirect_paths.none? { |excluded| redirect_to_path.include?(excluded) }
        redirect_to_path
      else
        root_path
      end