Skip to content

Commit

Permalink
Properly limit per-quantity calculator options
Browse files Browse the repository at this point in the history
item-adjustments and quantity-adjustments have their own config for
allowed calculators. When presenting a list of calculators for admins
editing promos we need to respect that config.
  • Loading branch information
Sinetheta committed Feb 20, 2018
1 parent 859143f commit 6ba7677
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
<%= number_field_tag field_name, promotion_action.preferred_group_size, class: "fullwidth", min: 1 %>
</div>

<%= render "spree/admin/promotions/actions/create_item_adjustments",
promotion_action: promotion_action, param_prefix: param_prefix %>
<%= render "spree/admin/promotions/actions/promotion_calculators_with_custom_fields",
calculators: Rails.application.config.spree.calculators.promotion_actions_create_quantity_adjustments,
promotion_action: promotion_action,
param_prefix: param_prefix
%>

0 comments on commit 6ba7677

Please sign in to comment.