<commit_before>class StreetSweep < ActiveRecord::Base
  def self.sections_by_ward(ward_id)
    where(ward_id: ward_id).pluck(:section).uniq
  end

  #def self.schedules(ward_id, section)
    #where(ward_id: ward_id, section: section)
  #end

  def self.schedules(ward_id)
    where(ward_id: ward_id)
  end

  def print_days
    return "No data" if dates.nil?
    dates.split(",").map(&:to_i).map(&:ordinalize).join(" and ")
  end
<commit_msg>Added schedules method that returns a faux JS object<commit_after>class StreetSweep < ActiveRecord::Base
  def self.sections_by_ward(ward_id)
    where(ward_id: ward_id).pluck(:section).uniq
  end

  def self.schedules(ward_section)
    where(ward_section: ward_section).map do |schedule|
      { month: schedule.print_month, days: schedule.print_days }
    end
  end

  def print_days
    return "No data" if dates.nil?
    dates.split(",").map(&:to_i).map(&:ordinalize).join(" and ")
  end

{'fraction_non_alphanumeric': 0.12633832976445397, 'fraction_numerical': 0.0, 'mean_word_length': 4.2824858757062145, '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': '1651538', 'n_tokens_mistral': 337, 'n_tokens_neox': 332, 'n_words': 69}