<commit_before>- collapsed = session[:contact_show_general].nil? # && contact.errors.empty?
= section_title :contact_show_general, collapsed, t(:general_info), t('show_general_info_small')
.show_fields
  #contact_show_general{ hidden_if(collapsed) }
    %table.asset_attributes
      %tr
        = col(t(:first_name), contact.first_name)
        = col(t(:last_name), contact.last_name)
      %tr
        = col(t(:email), contact.email, false, true)
        = col(t(:phone), contact.phone)
      %tr
        = col(t(:account)) do
          = account_with_url_for(contact)
        - assigned_to_user = User.find_by_id(contact.assigned_to)
        = col(t(:assigned_to), assigned_to_user ? link_to(assigned_to_user.name, url_for(assigned_to_user)) : "")
      %tr
        = col(t(:tags)) do
          .tags= tags_for_index(contact)

    -# Show custom fields that are in the default field group
    - custom_field_group = contact.field_groups.select{|f| f.name == 'custom_fields'}.first
    - if custom_field_group.present?
      - fields = custom_field_group.fields.without_pairs
      = render("fields/group_view", :fields => fields, :entity => contact) unless fields.nil?<commit_msg>Ensure assigned_to is rendered correctly<commit_after>- collapsed = session[:contact_show_general].nil? # && contact.errors.empty?
= section_title :contact_show_general, collapsed, t(:general_info), t('show_general_info_small')
.show_fields
  #contact_show_general{ hidden_if(collapsed) }
    %table.asset_attributes
      %tr
        = col(t(:first_name), contact.first_name)
        = col(t(:last_name), contact.last_name)
      %tr
        = col(t(:email), contact.email, false, true)
        = col(t(:phone), contact.phone)
      %tr
        = col(t(:account)) do
          = account_with_url_for(contact)
        - assigned_to_user = User.find_by_id(contact.assigned_to)
        = col(t(:assigned_to)) do
          = link_to(assigned_to_user.name, url_for(assigned_to_user)) if assigned_to_user
      %tr
        = col(t(:tags)) do
          .tags= tags_for_index(contact)

    -# Show custom fields that are in the default field group
    - custom_field_group = contact.field_groups.select{|f| f.name == 'custom_fields'}.first
    - if custom_field_group.present?
      - fields = custom_field_group.fields.without_pairs
      = render("fields/group_view", :fields => fields, :entity => contact) unless fields.nil?
{'fraction_non_alphanumeric': 0.12734082397003746, 'fraction_numerical': 0.0, 'mean_word_length': 3.5103189493433398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2392623', 'n_tokens_mistral': 778, 'n_tokens_neox': 772, 'n_words': 135}