<commit_before><h2>Active Skills</h2>
<% @character.active_skills.each do |active_skill| %>
    <% if can_edit %>
      <div class="row">
        <div class="col-md-8">
          <strong><%= BaseSkill.find(active_skill.base_skill_id).name %></strong>:
        </div>
        <div class="col-md-1">
          <%= active_skill.value_base %>
        </div>
        <div class="col-md-3">
          <%= link_to 'Delete', [active_skill.character, active_skill],
            method: :delete,
            data: { confirm: 'Are you sure?' } %>
        </div>
      </div>

      <div class="row">
        <% @character.skill_specialties.each do |specialty| %>
          <div class="col-md-8">
            <%= BaseSkillSpecialty.find(specialty.base_skill_specialty_id).name if specialty.base_skill_specialty_id.present? %>
          </div>
          <div class="col-md-1">
            <%= active_skill.value_base+2 %>
          </div>
          <% if can_edit %>
            <div class="col-md-3">
              <%= link_to 'Delete', [specialty.character, specialty],
                method: :delete,
                data: { confirm: 'Are you sure?' } %>
            </div>
          <% end %>
        <% end %>
      </div>

      <% if can_edit %>
        <p>
        <div class="row">
          <div class="col-md-12">
            <%= form_for([@character, @character.skill_specialties.build]) do |f| %>
              <%= f.label "Specialty" %>
              <%= f.select(:base_skill_specialty_id) do %>
                <% BaseSkillSpecialty.where(base_skill_id: active_skill.base_skill_id).each do |base_skill_specialty| -%>
                  <%= content_tag(:option, base_skill_specialty.name, value: base_skill_specialty.id) %>
                <% end %>
              <% end %>
              <%= f.submit "Add Specialty", class: "btn btn-default" %>
            <% end %>
          </div>
        </div><commit_msg>Fixed show all specialties bug<commit_after><h2>Active Skills</h2>
<% @character.active_skills.each do |active_skill| %>
    <% if can_edit %>
      <div class="row">
        <div class="col-md-8">
          <strong><%= BaseSkill.find(active_skill.base_skill_id).name %></strong>:
        </div>
        <div class="col-md-1">
          <%= active_skill.value_base %>
        </div>
        <div class="col-md-3">
          <%= link_to 'Delete', [active_skill.character, active_skill],
            method: :delete,
            data: { confirm: 'Are you sure?' } %>
        </div>
      </div>


      <div class="row">
        <% @character.skill_specialties.each do |specialty| %>

        <% if specialty.base_skill_specialty_id.present? && BaseSkillSpecialty.find(specialty.base_skill_specialty_id).base_skill_id == active_skill.base_skill_id %>
            <div class="col-md-8">
              <%= BaseSkillSpecialty.find(specialty.base_skill_specialty_id).name%>
            </div>
            <div class="col-md-1">
              <%= active_skill.value_base + 2 if active_skill.value_base.present? %>
            </div>
            <% if can_edit %>
              <div class="col-md-3">
                <%= link_to 'Delete', [specialty.character, specialty],
                  method: :delete,
                  data: { confirm: 'Are you sure?' } %>
              </div>
            <% end %>
          <% end %>
        <% end %>
      </div>

      <% if can_edit %>
        <p>
        <div class="row">
          <div class="col-md-12">
            <%= form_for([@character, @character.skill_specialties.build]) do |f| %>
              <%= f.label "Specialty" %>
              <%= f.select(:base_skill_specialty_id) do %>
                <% BaseSkillSpecialty.where(base_skill_id: active_skill.base_skill_id).each do |base_skill_specialty| -%>
                  <%= content_tag(:option, base_skill_specialty.name, value: base_skill_specialty.id) %>
                <% end %>
              <% end %>
              <%= f.submit "Add Specialty", class: "btn btn-default" %>
            <% end %>
          </div>
        </div>
{'fraction_non_alphanumeric': 0.16040533860603065, 'fraction_numerical': 0.005437469105289174, 'mean_word_length': 1.8202090592334494, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, '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': '5661577', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1278, 'n_words': 213}