mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
12398: add destroy action with turbo stream
This commit is contained in:
@@ -31,6 +31,14 @@ module Admin
|
||||
end
|
||||
end
|
||||
|
||||
# will update this in further commits
|
||||
def destroy
|
||||
@product = Spree::Product.find(params[:id])
|
||||
respond_with do |format|
|
||||
format.turbo_stream
|
||||
end
|
||||
end
|
||||
|
||||
def index_url(params)
|
||||
"/admin/products?#{params.to_query}" # todo: fix routing so this can be automaticly generated
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user