<commit_before>class ProjectsController < ApplicationController

  def index
    @projects = Project.all
  end
  
  def new
    @project = Project.new
  end
  
  def create
    @project = Project.new(params[:project])
    if @project.save
      flash[:notice] = "Project \"#{@project.name}\" has been created."
      redirect_to projects_url
    else
      flash[:error] = "Project could not be created."
      render :action => :new<commit_msg>Beginning of pagination in projects controller.<commit_after>class ProjectsController < ApplicationController

  def index
    @projects = Project.paginate(:page => params[:page], :per_page => 5)
  end
  
  def new
    @project = Project.new
  end
  
  def create
    @project = Project.new(params[:project])
    if @project.save
      flash[:notice] = "Project \"#{@project.name}\" has been created."
      redirect_to projects_url
    else
      flash[:error] = "Project could not be created."
      render :action => :new
{'fraction_non_alphanumeric': 0.11042311661506708, 'fraction_numerical': 0.0010319917440660474, 'mean_word_length': 3.0756302521008405, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2749703', 'n_tokens_mistral': 280, 'n_tokens_neox': 276, 'n_words': 81}