From e990e5ffd52e464a3dc9297d374f323f50512e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <2887858+deivid-rodriguez@users.noreply.github.com> Date: Tue, 4 Nov 2025 11:29:51 +0100 Subject: [PATCH] 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. --- app/controllers/admin/customers_controller.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/controllers/admin/customers_controller.rb b/app/controllers/admin/customers_controller.rb index ff5c43ab63..a7e0038e80 100644 --- a/app/controllers/admin/customers_controller.rb +++ b/app/controllers/admin/customers_controller.rb @@ -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