<commit_before>class UsersController < ApplicationController
  before_action :set_user, :finish_signup

  def finish_signup
    if request.patch? && params[:user] #&& params[:user][:email]
      if current_user.update(user_params)
        current_user.skip_reconfirmation!
        sign_in(current_user, :bypass => true)
				redirect_to current_user, notice: 'Dados atualizados com sucesso!'
      else
        @show_errors = true
      end
    end
  end

private
  def set_user
    @user = User.find(params[:id])
  end

  def user_params
		accessible = [ :name, :email ] # Adicionar quanto quiser
    accessible << [ :password, :password_confirmation ] unless params[:user][:password].blank?
    params.require(:user).permit(accessible)
  end
end
<commit_msg>redirecting users to home after authentication<commit_after>class UsersController < ApplicationController
  before_action :set_user, :finish_signup

  def finish_signup
    if request.patch? && params[:user] #&& params[:user][:email]
      if current_user.update(user_params)
        current_user.skip_reconfirmation!
        sign_in(current_user, bypass: true)
				redirect_to root_path, notice: 'Dados atualizados com sucesso!'
      else
        @show_errors = true
      end
    end
  end

private
  def set_user
    @user = User.find(params[:id])
  end

  def user_params
		accessible = [ :name, :email ] # Adicionar outros parâmetros
    accessible << [ :password, :password_confirmation ] unless params[:user][:password].blank?
    params.require(:user).permit(accessible)
  end
end

{'fraction_non_alphanumeric': 0.09941897998708844, 'fraction_numerical': 0.0, 'mean_word_length': 3.8286604361370715, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 4, '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': '3812528', 'n_tokens_mistral': 492, 'n_tokens_neox': 473, 'n_words': 111}