diff --git a/app/controllers/spree/admin/adjustments_controller.rb b/app/controllers/spree/admin/adjustments_controller.rb index 0728d8e6c9..9e0cf85374 100644 --- a/app/controllers/spree/admin/adjustments_controller.rb +++ b/app/controllers/spree/admin/adjustments_controller.rb @@ -15,7 +15,11 @@ module Spree end def collection - parent.adjustments.eligible + parent.adjustments.eligible | parent.shipment_adjustments.shipping + end + + def find_resource + parent.all_adjustments.eligible.find(params[:id]) end # Choose a default tax rate to show on the edit form. The adjustment stores its included diff --git a/spec/features/admin/order_spec.rb b/spec/features/admin/order_spec.rb index 1a85278b2d..db430ceb18 100644 --- a/spec/features/admin/order_spec.rb +++ b/spec/features/admin/order_spec.rb @@ -323,7 +323,7 @@ feature ' scenario "editing shipping fees" do click_link "Adjustments" - shipping_adjustment_tr_selector = "tr#spree_adjustment_#{order.adjustments.shipping.first.id}" + shipping_adjustment_tr_selector = "tr#spree_adjustment_#{order.shipment_adjustments.first.id}" page.find("#{shipping_adjustment_tr_selector} td.actions a.icon-edit").click fill_in "Amount", with: "5"