<commit_before>module GriffithCommon
  class ApplicationController < ActionController::Base
  
    DEFAULT_ROWS = 25
    MIN_ROWS     = 1
    MAX_ROWS     = 100
    DEFAULT_SORT = 'asc'

    helper_method :sort_column, :sort_direction

    def per_page
      if (MIN_ROWS..MAX_ROWS).include? params[:per_page]
        params[:per_page]
      else
        DEFAULT_ROWS
      end
    end


    def sort_direction direction = DEFAULT_SORT
      if %w[asc desc].include?(params[:direction])
        params[:direction]
      else
        direction
      end
    end


    def sort_column<commit_msg>change row default to 20<commit_after>module GriffithCommon
  class ApplicationController < ActionController::Base
  
    DEFAULT_ROWS = 20
    MIN_ROWS     = 1
    MAX_ROWS     = 100
    DEFAULT_SORT = 'asc'

    helper_method :sort_column, :sort_direction

    def per_page
      if (MIN_ROWS..MAX_ROWS).include? params[:per_page]
        params[:per_page]
      else
        DEFAULT_ROWS
      end
    end


    def sort_direction direction = DEFAULT_SORT
      if %w[asc desc].include?(params[:direction])
        params[:direction]
      else
        direction
      end
    end


    def sort_column
{'fraction_non_alphanumeric': 0.06839032527105922, 'fraction_numerical': 0.011676396997497914, 'mean_word_length': 2.361344537815126, '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': '5709666', 'n_tokens_mistral': 383, 'n_tokens_neox': 356, 'n_words': 83}