<commit_before>class Admin::UsersController < ApplicationController
  load_and_authorize_resource

  def index
    @users = User.all
  end
  
  def new
    @user = User.new
  end

  def create
    user = User.new
    user.email = params[:user][:email]
    user.name = params[:user][:name]
    user.from = params[:user][:from]
    user.password = <PASSWORD>ise.friendly_token.<PASSWORD>(8)
    if user.save
      flash[:notice] = "User created"
      redirect_to 'index'
    else
      flash[:alert] = "Error creating user"
      render 'new'
    end
  end

  def edit
  end

  def update
    @user.email = params[:user][:email]
    @user.name = params[:user][:name]
    @user.from = params[:user][:from]
    @user.save!
    redirect_to 'index'<commit_msg>fixed admin users paths in controllers<commit_after>class Admin::UsersController < ApplicationController
  load_and_authorize_resource

  def index
    @users = User.all
  end
  
  def new
    @user = User.new
  end

  def create
    user = User.new
    user.email = params[:user][:email]
    user.name = params[:user][:name]
    user.from = params[:user][:from]
    user.password = <PASSWORD>.friendly_<PASSWORD>(8)
    if user.save
      flash[:notice] = "User created"
      redirect_to admin_users_path
    else
      flash[:alert] = "Error creating user"
      render new_admin_user_path
    end
  end

  def edit
  end

  def update
    @user.email = params[:user][:email]
    @user.name = params[:user][:name]
    @user.from = params[:user][:from]
    @user.save!
    redirect_to admin_users_path
{'fraction_non_alphanumeric': 0.12002567394094994, 'fraction_numerical': 0.0012836970474967907, 'mean_word_length': 2.9872122762148337, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '6875710', 'n_tokens_mistral': 518, 'n_tokens_neox': 508, 'n_words': 116}