Skip to content

Commit

Permalink
Use symbols in polymorphic path for even_links
Browse files Browse the repository at this point in the history
Rails 5.2.6 introduced a security fix, that forces us to use symbols
in polymorphic paths.

Port of this original commit:
bc06da5

Co-authored-by: Thomas von Deyen <[email protected]>
  • Loading branch information
2 people authored and waiting-for-dev committed Jun 7, 2022
1 parent 1d0e144 commit c459403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/helpers/spree/admin/orders_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def event_links
links = []
@order_events.sort.each do |event|
next unless @order.send("can_#{event}?")
links << button_to(t(event, scope: 'spree'), [event, :admin, @order],
links << button_to(t(event, scope: 'spree'), [event.to_sym, :admin, @order],
method: :put,
data: { confirm: t('spree.order_sure_want_to', event: t(event, scope: 'spree')) })
end
Expand Down

0 comments on commit c459403

Please sign in to comment.