<commit_before>class SqueeksController < ApplicationController
  before_filter :load_squeeks

  def index
    @squeek = Squeek.new
  end

  def create
    squeek_params = params.require(:squeek).permit(:body)
    @squeek = current_user.squeeks.new(squeek_params)
    if @squeek.save
      flash[:notice] = "Your squeek has been posted"
      redirect_to squeeks_path
    else
      flash[:alert] = "Your squeek couldn't be posted. #{@squeek.errors.full_messages.join(" ")}"
      render :index
    end
  end

  private

  def load_squeeks
    @squeeks = Squeek.all.page params[:page]
  end
end<commit_msg>pull only necessary squeeks for page<commit_after>class SqueeksController < ApplicationController
  before_filter :load_squeeks

  def index
    @squeek = Squeek.new
  end

  def create
    squeek_params = params.require(:squeek).permit(:body)
    @squeek = current_user.squeeks.new(squeek_params)
    if @squeek.save
      flash[:notice] = "Your squeek has been posted"
      redirect_to squeeks_path
    else
      flash[:alert] = "Your squeek couldn't be posted. #{@squeek.errors.full_messages.join(" ")}"
      render :index
    end
  end

  private

  def load_squeeks
    @squeeks = Squeek.page params[:page]
  end
end
{'fraction_non_alphanumeric': 0.0935720097640358, 'fraction_numerical': 0.0, 'mean_word_length': 3.4086021505376345, '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': '4652991', 'n_tokens_mistral': 429, 'n_tokens_neox': 420, 'n_words': 96}