<commit_before>class InvolvementsController < ApplicationController
  def new
    if Person.count == 0
      flash[:alert] = "Association cannot be added until there are people."
      redirect_to people_path
    else
      @involvement = Involvement.new
    end
  end  

  def create
    @involvement = Involvement.create(params[:involvement])
    if @involvement.valid?
      flash[:notice] = "Involvement has been registered."
      raise error
      redirect_to @involvement.movie
    else
      flash[:alert] = "Involvement has not been registered."
      render action: 'new'
    end
  end

  def destroy
    @involvement = Involvement.find(params[:id])
    if !@involvement.nil? 
      movie = @involvement.movie
      @involvement.destroy
      flash[:notice] = "Association has been destroyed."
    else
      flash[:notice] = "Association has not been destroyed."
    end
      redirect_to movie
  end
end<commit_msg>Remove spare binding.pry<commit_after>class InvolvementsController < ApplicationController
  def new
    if Person.count == 0
      flash[:alert] = "Association cannot be added until there are people."
      redirect_to people_path
    else
      @involvement = Involvement.new
    end
  end  

  def create
    @involvement = Involvement.create(params[:involvement])
    if @involvement.valid?
      flash[:notice] = "Involvement has been registered."
      redirect_to @involvement.movie
    else
      flash[:alert] = "Involvement has not been registered."
      render action: 'new'
    end
  end

  def destroy
    @involvement = Involvement.find(params[:id])
    if !@involvement.nil? 
      movie = @involvement.movie
      @involvement.destroy
      flash[:notice] = "Association has been destroyed."
    else
      flash[:notice] = "Association has not been destroyed."
    end
      redirect_to movie
  end
end
{'fraction_non_alphanumeric': 0.08500270709258256, 'fraction_numerical': 0.0010828370330265296, 'mean_word_length': 2.8823529411764706, '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': '5925074', 'n_tokens_mistral': 552, 'n_tokens_neox': 531, 'n_words': 155}