<commit_before><body class="set-background">
<div class="border-form-div">
  <h2>Edit <%= resource_name.to_s.humanize %></h2>

  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put}) do |f| %>
      <%= devise_error_messages! %>

      <% unless current_user.avatar.nil? %>
          <div><%= image_tag(current_user.avatar.medium.url) %></div>
      <% end %>

      <div class="field">
        <%= f.label :avatar %>
        <%= f.file_field :avatar %>
      </div>

      <div class="field">
        <%= f.label :firstname %><br/>
        <%= f.text_field :firstname, autofocus: true %><commit_msg>fixed error while checking if a user avatar is present<commit_after><body class="set-background">
<div class="border-form-div">
  <h2>Edit <%= resource_name.to_s.humanize %></h2>

  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put}) do |f| %>
      <%= devise_error_messages! %>

      <% unless current_user.avatar.present? %>
          <div><%= image_tag(current_user.avatar.medium.url) %></div>
      <% end %>

      <div class="field">
        <%= f.label :avatar %>
        <%= f.file_field :avatar %>
      </div>

      <div class="field">
        <%= f.label :firstname %><br/>
        <%= f.text_field :firstname, autofocus: true %>
{'fraction_non_alphanumeric': 0.18912881608339538, 'fraction_numerical': 0.0029784065524944155, 'mean_word_length': 3.097560975609756, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, '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': '967432', 'n_tokens_mistral': 498, 'n_tokens_neox': 451, 'n_words': 89}