<commit_before>class EloRating < ActiveRecord::Base
  belongs_to :user
  belongs_to :tournament

  def self.with_defaults
    where(:rating => 1000, :games_played => 0, :pro => false)
  end

  def self.by_rating
    order('elo_ratings.rating DESC')
  end

end<commit_msg>When two (or more) elo ratings are equal, order by games played (desc)<commit_after>class EloRating < ActiveRecord::Base
  belongs_to :user
  belongs_to :tournament

  def self.with_defaults
    where(:rating => 1000, :games_played => 0, :pro => false)
  end

  def self.by_rating
    order('elo_ratings.rating DESC, elo_ratings.games_played DESC')
  end

end
{'fraction_non_alphanumeric': 0.1, 'fraction_numerical': 0.015873015873015872, 'mean_word_length': 4.3474576271186445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '2725079', 'n_tokens_mistral': 235, 'n_tokens_neox': 213, 'n_words': 57}