<commit_before>class QuestionsController < ApplicationController

  def index
    @questions = Question.all
    @questions_grid = QuestionsGrid.new(params[:question_grid]) do |scope|
      scope.page(params[:page])
    end
  end

  def show
    @question = Question.find(params[:id])
  end

  def new
    @question = Question.new
  end

  def create
    @question = Question.new(question_params)
    if @question.save
      flash[:success] = 'Created the new question!'
      redirect_to @question
    else
      render 'new'
    end
  end

  def edit
    @question = Question.find(params[:id])
  end<commit_msg>Fix bug where questions table wouldn't sort.<commit_after>class QuestionsController < ApplicationController

  def index
    @questions = Question.all
    @questions_grid = QuestionsGrid.new(params[:questions_grid]) do |scope|
      scope.page(params[:page])
    end
  end

  def show
    @question = Question.find(params[:id])
  end

  def new
    @question = Question.new
  end

  def create
    @question = Question.new(question_params)
    if @question.save
      flash[:success] = 'Created the new question!'
      redirect_to @question
    else
      render 'new'
    end
  end

  def edit
    @question = Question.find(params[:id])
  end
{'fraction_non_alphanumeric': 0.09554140127388536, 'fraction_numerical': 0.0, 'mean_word_length': 3.054838709677419, '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': '3308582', 'n_tokens_mistral': 380, 'n_tokens_neox': 363, 'n_words': 99}