<commit_before>class SecurityMailer < ApplicationMailer
	layout nil

  def notify(user, type, activity)
    address = []
    Geocoder.configure(language: I18n.locale)
    ip_result = Geocoder.search(activity.ip).first
    unless ip_result.blank? || ip_result.data["loc"].blank?
      loc_result = Geocoder.search(ip_result.data["loc"]).first
      address = [loc_result.city, loc_result.country]
    end
  	@user = user
  	@type = type
  	email = user.email<commit_msg>Fix errbit error - undefined method city for nil:NilClass<commit_after>class SecurityMailer < ApplicationMailer
	layout nil

  def notify(user, type, activity)
    address = []
    Geocoder.configure(language: I18n.locale)
    ip_result = Geocoder.search(activity.ip).first
    unless ip_result.blank? || ip_result.data["loc"].blank?
      loc_result = Geocoder.search(ip_result.data["loc"]).first
      address = [loc_result.city, loc_result.country] unless loc_result.nil?
    end
  	@user = user
  	@type = type
  	email = user.email
{'fraction_non_alphanumeric': 0.11343283582089553, 'fraction_numerical': 0.003980099502487562, 'mean_word_length': 3.859903381642512, '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': '3804637', 'n_tokens_mistral': 330, 'n_tokens_neox': 325, 'n_words': 66}