mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
update the set_distribution form on the same path
and use the same method `OrdersController#set_distribution`
This commit is contained in:
@@ -24,7 +24,15 @@ module Spree
|
||||
redirect_to spree.distribution_admin_order_path(@order)
|
||||
end
|
||||
|
||||
def set_distribution; end
|
||||
def set_distribution
|
||||
return if order_params.blank?
|
||||
|
||||
on_update
|
||||
|
||||
@order.update(order_params)
|
||||
@order.save
|
||||
redirect_to spree.admin_order_customer_path(@order)
|
||||
end
|
||||
|
||||
def edit
|
||||
@order.shipments.map(&:refresh_rates)
|
||||
|
||||
Reference in New Issue
Block a user