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: emails_controller.rb
    path of file: ./repos/action_auth/app/controllers/action_auth/identity
    
    the code of the file until where you have to start completion: module ActionAuth
  module Identity
    class EmailsController < ApplicationController
      before_action
    
      def redirect_to_root
        if @user.email_previously_changed?
          resend_email_verification
          redirect_to sign_in_path, notice: "Your email has been changed. Check your email to verify your email."
        else
          redirect_to sign_in_path
        end