<commit_before>class InvitationActivityNotifier

  def self.deliver(invitation)  
    puts 'make activity'
    a = Activity.new
    a.user_id = invitation.recipient_user_id
    a.activity_type = 'INVITATION'
    a.invitation_code = invitation.code
    a.invitation_group_name =  invitation.group.name
    a.invitation_sender = invitation.user.username
    a.title = "#{invitation.user.username} has invited you to join the group \"#{invitation.group.name}\""
    a.created_at = DateTime.now
    a.seen = false
    a.save!
  end
end<commit_msg>Moving to new, more generic activity model<commit_after>class InvitationActivityNotifier

  def self.deliver(invitation)  
    a = Activity.new
    a.user_id = invitation.recipient_user_id
    a.activity_type = 'INVITATION'
    a.invitation_code = invitation.code
    a.invitation_group_name =  invitation.group.name
    a.invitation_sender = invitation.user.username
    a.created_at = DateTime.now
    a.seen = false
    a.save!
  end
end
{'fraction_non_alphanumeric': 0.08850457782299084, 'fraction_numerical': 0.0, 'mean_word_length': 3.5137614678899083, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6098005', 'n_tokens_mistral': 322, 'n_tokens_neox': 320, 'n_words': 64}