mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user