<commit_before><tr id="<%= spree_dom_id image %>" data-hook="images_row">

  <td>
    <% if can?(:update_positions, Spree::Image) %>
      <span class="handle"></span>
    <% end %>
  </td>

  <td>
    <span class="modal-image-trigger" data-toggle="modal" data-target="#modal-image-<%= image.id %>">
      <%= render 'spree/admin/shared/image', image: image, size: :mini %>
    </span>
    <%= render(
      "spree/admin/shared/modal",
      target: "modal-image-#{image.id}",
      title: image.alt,
      content: %{
        <div class='align-center'>
          #{image_tag(image.attachment.url(:large))}
        </div>
      }.html_safe
    ) %>
  </td>

  <% if @product.has_variants? %>
    <td>
      <%= fields_for image do |f| %>
        <%= f.select :viewable_id, options_for_select(@variants, image.viewable_id), {}, class: 'select2 fullwidth', autocomplete: "off" %>
      <% end %>
    </td>
  <% end # @product.has_variants? %>

  <td>
    <%= fields_for image do |f| %>
      <%= f.text_field :alt %>
    <% end %>
  </td>

  <td class="actions">
    <% if can?(:update, image) %>
      <%= link_to_with_icon 'check', t('spree.actions.save'), api_variant_image_path(@product, image), no_text: true, data: {action: 'save'} %>

      <%= link_to_with_icon 'cancel', t('spree.actions.cancel'), nil, no_text: true, data: {action: 'cancel'} %>

      <%= link_to_with_icon 'edit', t('spree.actions.edit'), edit_admin_product_image_path(@product, image), no_text: true, data: {action: 'edit'} %>
    <% end %>

    <% if can?(:destroy, image) %>
      <%= link_to_delete image, { url: admin_product_image_url(@product, image), no_text: true } %>
    <% end %>
  </td>
</tr><commit_msg>fix route for editing image in bo<commit_after><tr id="<%= spree_dom_id image %>" data-hook="images_row">

  <td>
    <% if can?(:update_positions, Spree::Image) %>
      <span class="handle"></span>
    <% end %>
  </td>

  <td>
    <span class="modal-image-trigger" data-toggle="modal" data-target="#modal-image-<%= image.id %>">
      <%= render 'spree/admin/shared/image', image: image, size: :mini %>
    </span>
    <%= render(
      "spree/admin/shared/modal",
      target: "modal-image-#{image.id}",
      title: image.alt,
      content: %{
        <div class='align-center'>
          #{image_tag(image.attachment.url(:large))}
        </div>
      }.html_safe
    ) %>
  </td>

  <% if @product.has_variants? %>
    <td>
      <%= fields_for image do |f| %>
        <%= f.select :viewable_id, options_for_select(@variants, image.viewable_id), {}, class: 'select2 fullwidth', autocomplete: "off" %>
      <% end %>
    </td>
  <% end # @product.has_variants? %>

  <td>
    <%= fields_for image do |f| %>
      <%= f.text_field :alt %>
    <% end %>
  </td>

  <td class="actions">
    <% if can?(:update, image) %>
      <%= link_to_with_icon 'check', t('spree.actions.save'), api_product_image_path(@product, image), no_text: true, data: {action: 'save'} %>

      <%= link_to_with_icon 'cancel', t('spree.actions.cancel'), nil, no_text: true, data: {action: 'cancel'} %>

      <%= link_to_with_icon 'edit', t('spree.actions.edit'), edit_admin_product_image_path(@product, image), no_text: true, data: {action: 'edit'} %>
    <% end %>

    <% if can?(:destroy, image) %>
      <%= link_to_delete image, { url: admin_product_image_url(@product, image), no_text: true } %>
    <% end %>
  </td>
</tr>
{'fraction_non_alphanumeric': 0.20669406928948914, 'fraction_numerical': 0.0005871990604815032, 'mean_word_length': 3.1498172959805117, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, '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': '6812708', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1201, 'n_words': 237}