app/controllers/application_controller.rb
# Redirect user to sign_out if user is has another session
Redirect user to sign_out if user is has another session
Redirect user to sign_out if user is has another session
def check_concurrent_session
    return unless is_already_logged_in?
    session[:duplicate] = true
    redirect_to main_app.destroy_user_session_path
  end
def check_concurrent_session return unless is_already_logged_in? session [ :duplicate ] = true redirect_to main_app . destroy_user_session_path end
Redirect user to sign_out if user is has another session
Redirect user to sign_out if user is has another session