mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-15 04:14:24 +00:00
WIP: ProxyOrders don't require an order, adding an edit path for proxy orders
initialises an order if one does not exist and redirects to its edit path
This commit is contained in:
@@ -2,6 +2,11 @@ module Admin
|
||||
class ProxyOrdersController < ResourceController
|
||||
respond_to :json
|
||||
|
||||
def edit
|
||||
@proxy_order.initialise_order! unless @proxy_order.order
|
||||
redirect_to spree.edit_admin_order_path(@proxy_order.order)
|
||||
end
|
||||
|
||||
def cancel
|
||||
if @proxy_order.cancel
|
||||
respond_with(@proxy_order) do |format|
|
||||
|
||||
Reference in New Issue
Block a user