<commit_before>class PeopleNetworkController < ApplicationController
  before_filter :authenticate_user!
  # TODO add some verification who can destroy people network

  def destroy
    @people_network = PeopleNetwork.find(params[:id])
    trusted_person = @people_network.trusted_person
    PeopleNetwork.involves(@people_network.person).involves(@people_network.trusted_person).limit(2).destroy_all
    redirect_to(trusted_person, :notice => I18n.t('messages.people_network.destroy'))
  end
end<commit_msg>Save to event log if relationship broken<commit_after>class PeopleNetworkController < ApplicationController
  before_filter :authenticate_user!
  # TODO add some verification who can destroy people network

  def destroy
    @people_network = PeopleNetwork.find(params[:id])
    trusted_person = @people_network.trusted_person
    EventLog.create_news_event_log(@people_network.person, @people_network.trusted_person, nil, EventType.trust_withdrawn)
    PeopleNetwork.involves(@people_network.person).involves(@people_network.trusted_person).limit(2).destroy_all
    redirect_to(trusted_person, :notice => I18n.t('messages.people_network.destroy'))
  end
end
{'fraction_non_alphanumeric': 0.08662092624356775, 'fraction_numerical': 0.005145797598627788, 'mean_word_length': 6.728476821192053, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7310501', 'n_tokens_mistral': 336, 'n_tokens_neox': 325, 'n_words': 61}