<commit_before>class AccountActivationsController < ApplicationController

  def edit
    user = User.find_by(email: params[:email])
    if user && !user.activated? && user.authenticated?(:activation, params[:id])
      user.activate
      log_in user
      flash[:success] = "Your account has been activated!"
      redirect_to profile_url
    else
      flash[:danger] = "Invalid activation link."
      redirect_to root_url
    end
  end
end
<commit_msg>Redirect new users to root instead of profile<commit_after>class AccountActivationsController < ApplicationController

  def edit
    user = User.find_by(email: params[:email])
    if user && !user.activated? && user.authenticated?(:activation, params[:id])
      user.activate
      log_in user
      flash[:success] = "Your account has been activated!"
      redirect_to root_url
    else
      flash[:danger] = "Invalid activation link."
      redirect_to root_url
    end
  end
end

{'fraction_non_alphanumeric': 0.0911983032873807, 'fraction_numerical': 0.0, 'mean_word_length': 3.452830188679245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5893726', 'n_tokens_mistral': 266, 'n_tokens_neox': 255, 'n_words': 75}