From df769a2f4ced3a787afb1675ca6256e5d0e6194d Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 11 Jun 2013 16:57:14 +1000 Subject: [PATCH] ensure latest 'payment' object is used for the capture button --- app/overrides/add_capture_order_shortcut.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/overrides/add_capture_order_shortcut.rb b/app/overrides/add_capture_order_shortcut.rb index c64379f866..e0f22cb0da 100644 --- a/app/overrides/add_capture_order_shortcut.rb +++ b/app/overrides/add_capture_order_shortcut.rb @@ -2,7 +2,7 @@ Deface::Override.new(:virtual_path => "spree/admin/orders/index", :name => "add_capture_order_shortcut", :insert_bottom => "[data-hook='admin_orders_index_row_actions']", #copied from backend / app / views / spree / admin / payments / _list.html.erb: - :text => '<% order.payment.actions.grep(/^capture$/).each do |action| %> + :text => '<% order.payments.last.actions.grep(/^capture$/).each do |action| %> <%= link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, order.payment, :e => action), :method => :put, :no_text => true, :data => {:action => action} %> <% end %>' )