<commit_before>%h3 Heroes
%table.table
  %tr
    %th Name
    %th Archetype
    %th User
  - heroes.each do |hero|
    %tr
      %td= hero.name
      %td
        = hero.archetype
      %td
        = hero.user<commit_msg>Add action buttons to hero's list.<commit_after>%h3 Heroes

- if policy(Hero.new(campaign: campaign)).new?
  %p{ style: 'margin-top: 2em; margin-bottom: 2em;' }
    = link_to new_campaign_hero_path(campaign, hero), class: 'btn btn-success' do
      Add hero
      &nbsp;
      %span.glyphicon.glyphicon-user

%table.table
  %tr
    %th Name
    %th Archetype
    %th User
    %th
  - heroes.each do |hero|
    %tr
      %td= hero.name
      %td
        = hero.archetype
      %td
        = hero.user
      %td
        - if policy(hero).edit?
          = link_to edit_campaign_hero_path(campaign, hero), class: 'btn btn-primary' do
            %span.glyphicon.glyphicon-pencil
            &nbsp;
            Edit
        - if policy(hero).destroy?
          = link_to campaign_hero_path(campaign, hero), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' do
            Destroy
            &nbsp;
            %span.glyphicon.glyphicon-trash
{'fraction_non_alphanumeric': 0.11729957805907174, 'fraction_numerical': 0.0033755274261603376, 'mean_word_length': 1.979899497487437, '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': '1663499', 'n_tokens_mistral': 416, 'n_tokens_neox': 398, 'n_words': 97}