<commit_before>module Trax
  module Model
    module Mixins
      module SortByScopes
        extend ::Trax::Model::Mixin

        included do
          scope :sort_by_most_recent, lambda{|field_name='created_at'|
            order("#{field_name} ASC")
          }
          scope :sort_by_least_recent, lambda{|field_name='created_at'|
            order("#{field_name} DESC")
          }

          class << self
            alias_method :sort_by_newest, :sort_by_most_recent
            alias_method :sort_by_oldest, :sort_by_least_recent
            alias_method :by_newest, :sort_by_most_recent
            alias_method :by_oldest, :sort_by_least_recent
          end
        end
      end
    end
  end
end<commit_msg>order scope sort direction should be flipped<commit_after>module Trax
  module Model
    module Mixins
      module SortByScopes
        extend ::Trax::Model::Mixin

        included do
          scope :sort_by_most_recent, lambda{|field_name='created_at'|
            order("#{field_name} DESC")
          }
          scope :sort_by_least_recent, lambda{|field_name='created_at'|
            order("#{field_name} ASC")
          }

          class << self
            alias_method :sort_by_newest, :sort_by_most_recent
            alias_method :sort_by_oldest, :sort_by_least_recent
            alias_method :by_newest, :sort_by_most_recent
            alias_method :by_oldest, :sort_by_least_recent
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07447528774542993, 'fraction_numerical': 0.0, 'mean_word_length': 2.2200435729847494, 'pattern_counts': {'":': 0, '<': 7, '<?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': '117153', 'n_tokens_mistral': 474, 'n_tokens_neox': 444, 'n_words': 89}