use render edit instead of redirect_to

with redirect_to, the validation errors will be lost at the rendering time.
This commit is contained in:
Mohamed ABDELLANI
2023-11-27 15:49:24 +01:00
parent a0c2facca4
commit a13e087541

View File

@@ -50,9 +50,8 @@ module Spree
flash[:success] = flash_message_for(@object, :successfully_updated)
redirect_to spree.admin_product_variants_url(params[:product_id], @url_filters)
else
redirect_to spree.edit_admin_product_variant_url(params[:product_id],
@object,
@url_filters)
load_data
render :edit
end
end