Don't show flash messages in customer edition form

They don't actually show up when the customer is saved, but the next
time the page is reloaded. We already have the save bar for the same
purpose so it's not necessary.
This commit is contained in:
David Rodríguez
2025-11-04 11:29:51 +01:00
parent 3d7207d8c5
commit e990e5ffd5

View File

@@ -51,6 +51,18 @@ module Admin
end
end
# copy of Admin::ResourceController without flash notice
def update
if @object.update(permitted_resource_params)
respond_with(@object) do |format|
format.html { redirect_to location_after_save }
format.js { render layout: false }
end
else
respond_with(@object)
end
end
# copy of Admin::ResourceController without flash notice
def destroy
if @object.destroy