<commit_before>class Task < ActiveRecord::Base
  validates_presence_of :name
  has_many :timelogs, :order => 'start_at'

  def self.todos
    find_all_by_done(false,:order => "priority")
  end

  def self.reorder(new_order)
    new_order.each_with_index { |id,index| Task.find(id).update_attribute(:priority,index+1)}
  end
  
end
<commit_msg>Chagned find_all to scope method in Task<commit_after>class Task < ActiveRecord::Base
  validates_presence_of :name
  has_many :timelogs, :order => 'start_at'
  scope :todos, where("done = ?",false).order("priority")

  def self.reorder(new_order)
    new_order.each_with_index { |id,index| Task.find(id).update_attribute(:priority,index+1)}
  end
  
end

{'fraction_non_alphanumeric': 0.12464183381088825, 'fraction_numerical': 0.0028653295128939827, 'mean_word_length': 5.412844036697248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1156036', 'n_tokens_mistral': 257, 'n_tokens_neox': 253, 'n_words': 47}