<commit_before>class Admin::ValuatorGroupsController < Admin::BaseController

  def index
    @groups = ValuatorGroup.all.page(params[:page])
  end

  def show
    @group = ValuatorGroup.find(params[:id])
  end

  def new
    @group = ValuatorGroup.new
  end

  def edit
    @group = ValuatorGroup.find(params[:id])
  end

  def create
    @group = ValuatorGroup.new(group_params)
    if @group.save
      notice = t("user_group.notice.created")
      redirect_to [:admin, @group], notice: notice
    else
      render :new
    end
  end

  def update
    @group = ValuatorGroup.find(params[:id])
    if @group.update(group_params)
      notice = t("user_group.notice.updated")
      redirect_to [:admin, @group], notice: notice
    else
      render :edit
    end
  end

  def destroy
    @group = ValuatorGroup.find(params[:id])
    @group.destroy
    notice = t("user_group.notice.destroyed")
    redirect_to admin_valuator_groups_path, notice: notice
  end

  private

    def group_params
      params.require(:valuator_group).permit(:name)
    end

end<commit_msg>Changes redirect path on create valuator group<commit_after>class Admin::ValuatorGroupsController < Admin::BaseController

  def index
    @groups = ValuatorGroup.all.page(params[:page])
  end

  def show
    @group = ValuatorGroup.find(params[:id])
  end

  def new
    @group = ValuatorGroup.new
  end

  def edit
    @group = ValuatorGroup.find(params[:id])
  end

  def create
    @group = ValuatorGroup.new(group_params)
    if @group.save
      notice = t("user_group.notice.created")
      redirect_to admin_valuator_groups_path, notice: notice
    else
      render :new
    end
  end

  def update
    @group = ValuatorGroup.find(params[:id])
    if @group.update(group_params)
      notice = t("user_group.notice.updated")
      redirect_to [:admin, @group], notice: notice
    else
      render :edit
    end
  end

  def destroy
    @group = ValuatorGroup.find(params[:id])
    @group.destroy
    notice = t("user_group.notice.destroyed")
    redirect_to admin_valuator_groups_path, notice: notice
  end

  private

    def group_params
      params.require(:valuator_group).permit(:name)
    end

end
{'fraction_non_alphanumeric': 0.10032065964269354, 'fraction_numerical': 0.0, 'mean_word_length': 3.1520912547528517, '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': '5894831', 'n_tokens_mistral': 728, 'n_tokens_neox': 709, 'n_words': 158}