<commit_before><div class="promotion_action <%= promotion_action.type.demodulize.underscore %>" id="<%= dom_id promotion_action %>">
  <span class="delete">
    <%= link_to_with_icon 'cross', '', spree.admin_promotion_promotion_action_path(@promotion, promotion_action), :remote => true, :method => :delete %>
  </span>
  <% type_name = promotion_action.class.name.demodulize.underscore %>
  <% param_prefix = "promotion[promotion_actions_attributes][#{promotion_action.id}]" %>
  <%= hidden_field_tag "#{param_prefix}[id]", promotion_action.id %>
  <p><%= t("promotion_action_types.#{type_name}.description") %></p>
  <%= render :partial => "spree/admin/promotions/actions/#{type_name}",
             :locals => { :promotion_action => promotion_action, :param_prefix => param_prefix } %>
</div><commit_msg>Convert type to string in _promotion_action.html.erb. Fixes #1047.<commit_after><div class="promotion_action <%= promotion_action.type.to_s.demodulize.underscore %>" id="<%= dom_id promotion_action %>">
  <span class="delete">
    <%= link_to_with_icon 'cross', '', spree.admin_promotion_promotion_action_path(@promotion, promotion_action), :remote => true, :method => :delete %>
  </span>
  <% type_name = promotion_action.class.name.demodulize.underscore %>
  <% param_prefix = "promotion[promotion_actions_attributes][#{promotion_action.id}]" %>
  <%= hidden_field_tag "#{param_prefix}[id]", promotion_action.id %>
  <p><%= t("promotion_action_types.#{type_name}.description") %></p>
  <%= render :partial => "spree/admin/promotions/actions/#{type_name}",
             :locals => { :promotion_action => promotion_action, :param_prefix => param_prefix } %>
</div>
{'fraction_non_alphanumeric': 0.17942583732057416, 'fraction_numerical': 0.0023923444976076554, 'mean_word_length': 6.242424242424242, 'pattern_counts': {'":': 0, '<': 31, '<?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': '5711724', 'n_tokens_mistral': 580, 'n_tokens_neox': 545, 'n_words': 78}