<commit_before>class UsersController < ApplicationController
  before_action :set_user, only: [:show, :edit, :update, :destroy]

  # GET /users
  # GET /users.json
  def index
    @users = User.all
  end

  # GET /users/1
  # GET /users/1.json
  def show
  end

  # GET /users/new
  def new
    user = User.new
    email = Email.new
    @user_form = UserForm.new(user: user, email: email)
  end

  # GET /users/1/edit
  def edit
    @user_form = UserForm.new(user: @user, email: @user.email)
  end

  # POST /users
  # POST /users.json
  def create
    @user_form = UserForm.new(user: User.new, email: Email.new)
    # This is a dirty-fix to check that it creates the models.
    params.class.permit_all_parameters = true
    @user_form.submit(params)

    respond_to do |format|
      if @user_form.save
        format.html { redirect_to @user_form, notice: 'User was successfully created.' }<commit_msg>Remove redundant creation of Email object<commit_after>class UsersController < ApplicationController
  before_action :set_user, only: [:show, :edit, :update, :destroy]

  # GET /users
  # GET /users.json
  def index
    @users = User.all
  end

  # GET /users/1
  # GET /users/1.json
  def show
  end

  # GET /users/new
  def new
    user = User.new
    @user_form = UserForm.new(user: user)
  end

  # GET /users/1/edit
  def edit
    @user_form = UserForm.new(user: @user, email: @user.email)
  end

  # POST /users
  # POST /users.json
  def create
    @user_form = UserForm.new(user: User.new, email: Email.new)
    # This is a dirty-fix to check that it creates the models.
    params.class.permit_all_parameters = true
    @user_form.submit(params)

    respond_to do |format|
      if @user_form.save
        format.html { redirect_to @user_form, notice: 'User was successfully created.' }
{'fraction_non_alphanumeric': 0.1076581576026637, 'fraction_numerical': 0.003329633740288568, 'mean_word_length': 2.869098712446352, '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': '6641675', 'n_tokens_mistral': 629, 'n_tokens_neox': 610, 'n_words': 177}