12398: add destroy action with turbo stream

This commit is contained in:
Ahmed Ejaz
2024-05-23 14:30:28 +05:00
parent e5b9e07874
commit 53fb77eb23
3 changed files with 11 additions and 0 deletions

View File

@@ -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