<commit_before>class ProjectsController < ApplicationController
  before_filter :authenticate, only: [:edit, :destroy, :update]

  # GET /projects/1
  # GET /projects/1.json
  def show
    @project = Project.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @project }
    end
  end

  # GET /projects/new
  # GET /projects/new.json
  def new
    @project = Project.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @project }
    end
  end

  # GET /projects/1/edit
  def edit
    @project = Project.find(params[:id])
  end

  # POST /projects
  # POST /projects.json
  def create

    @project = Project.new(params[:project])

    respond_to do |format|
      if @project.save
        format.html { redirect_to new_user_path, notice: 'Project was successfully created.' }
        format.json { render json: @project, status: :created, location: @project }<commit_msg>Project created now results in a success notification not just a notice<commit_after>class ProjectsController < ApplicationController
  before_filter :authenticate, only: [:edit, :destroy, :update]

  # GET /projects/1
  # GET /projects/1.json
  def show
    @project = Project.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @project }
    end
  end

  # GET /projects/new
  # GET /projects/new.json
  def new
    @project = Project.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @project }
    end
  end

  # GET /projects/1/edit
  def edit
    @project = Project.find(params[:id])
  end

  # POST /projects
  # POST /projects.json
  def create

    @project = Project.new(params[:project])

    respond_to do |format|
      if @project.save
        format.html { redirect_to new_user_path, flash: { success: 'Project was successfully created.' } }
        format.json { render json: @project, status: :created, location: @project }
{'fraction_non_alphanumeric': 0.10886699507389162, 'fraction_numerical': 0.002955665024630542, 'mean_word_length': 2.853889943074004, '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': '2749702', 'n_tokens_mistral': 642, 'n_tokens_neox': 617, 'n_words': 178}