<commit_before>class UsersController < ApplicationController
  before_filter :authenticate!
  before_filter :correct_user?, :only => [:edit, :update]

  def index
    @users = User.all
  end

  def edit
    @user = User.find(params[:id])
  end

  def update
    @user = User.find(params[:id])
    if @user.update_attributes(params[:user])
      redirect_to @user
    else
      render :edit
    end
  end

  def show
    @user = User.find(params[:id])
    @likes = likes_for(@user)
  end

  def show_nickname
    @user = User.find_by_nickname!(params[:nickname])
    @likes = likes_for(@user)
    render :show
  end

  private

    def correct_user?
      @user = User.find(params[:id])
      redirect_back_or(root_path) unless current_user?(@user)
    end

    def likes_for(user)
      @user.likes.paginate(page:params[:page]).order("created_time DESC")
    end
end
<commit_msg>update the per page count<commit_after>class UsersController < ApplicationController
  before_filter :authenticate!
  before_filter :correct_user?, :only => [:edit, :update]

  def index
    @users = User.all
  end

  def edit
    @user = User.find(params[:id])
  end

  def update
    @user = User.find(params[:id])
    if @user.update_attributes(params[:user])
      redirect_to @user
    else
      render :edit
    end
  end

  def show
    @user = User.find(params[:id])
    @likes = likes_for(@user)
  end

  def show_nickname
    @user = User.find_by_nickname!(params[:nickname])
    @likes = likes_for(@user)
    render :show
  end

  private

    def correct_user?
      @user = User.find(params[:id])
      redirect_back_or(root_path) unless current_user?(@user)
    end

    def likes_for(user)
      @user.likes.paginate(page:params[:page], per_page:5).order("created_time DESC")
    end
end

{'fraction_non_alphanumeric': 0.11771300448430494, 'fraction_numerical': 0.0005605381165919282, 'mean_word_length': 3.2298578199052135, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4104928', 'n_tokens_mistral': 617, 'n_tokens_neox': 598, 'n_words': 133}