<commit_before>class Restaurant < ApplicationRecord
  belongs_to :restaurant_category
  validates :address, presence: true
  geocoded_by :address   # can also be an IP address
  after_validation :geocode          # auto-fetch coordinates
  has_many :menus
  has_many :dishes, through: :menus
  has_many :dish_categories, through: :dishes

  def self.for_markers
    all.to_a.map(&:serializable_hash).map do |restaurant|
      {name: restaurant['name'],
       lattitude: restaurant['latitude'],
       longitude: restaurant['longitude']}
    end
  end
end<commit_msg>[HOT FIX] Typo in class method<commit_after>class Restaurant < ApplicationRecord
  belongs_to :restaurant_category
  validates :address, presence: true
  geocoded_by :address   # can also be an IP address
  after_validation :geocode          # auto-fetch coordinates
  has_many :menus
  has_many :dishes, through: :menus
  has_many :dish_categories, through: :dishes

  def self.for_markers
    all.to_a.map(&:serializable_hash).map do |restaurant|
      {name: restaurant['name'],
       latitude: restaurant['latitude'],
       longitude: restaurant['longitude']}
    end
  end
end
{'fraction_non_alphanumeric': 0.09043478260869565, 'fraction_numerical': 0.0, 'mean_word_length': 4.092920353982301, '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': '4086275', 'n_tokens_mistral': 363, 'n_tokens_neox': 355, 'n_words': 94}