<commit_before>class MinistersController < ApplicationController
  before_action :authenticate_user!, PQUserFilter
  before_action :set_minister, only: [:show, :edit, :update, :destroy]

  def index
    @ministers = Minister.order('lower(name)')
  end

  def show
    @minister_contacts = @minister.minister_contacts.active
  end

  def new
    @minister = Minister.new
    @minister.minister_contacts << MinisterContact.new
  end

  def create
    @minister = Minister.new(minister_params)
    if @minister.save
      flash[:success] = 'Minister was successfully created.'
      redirect_to @minister
    else
      render action: 'new'
    end
  end<commit_msg>Now displays inactive minister contacts<commit_after>class MinistersController < ApplicationController
  before_action :authenticate_user!, PQUserFilter
  before_action :set_minister, only: [:show, :edit, :update, :destroy]

  def index
    @ministers = Minister.order('lower(name)')
  end

  def show
    @minister_contacts = @minister.minister_contacts
  end

  def new
    @minister = Minister.new
    @minister.minister_contacts << MinisterContact.new
  end

  def create
    @minister = Minister.new(minister_params)
    if @minister.save
      flash[:success] = 'Minister was successfully created.'
      redirect_to @minister
    else
      render action: 'new'
    end
  end
{'fraction_non_alphanumeric': 0.08698884758364313, 'fraction_numerical': 0.0, 'mean_word_length': 3.807142857142857, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1199368', 'n_tokens_mistral': 400, 'n_tokens_neox': 408, 'n_words': 101}