From db4570ad83f0bc63c4763299d412e969a1afd117 Mon Sep 17 00:00:00 2001 From: Jimmy Li Date: Wed, 26 Jun 2024 23:05:35 -0400 Subject: [PATCH] GREEN fix #4172 displays item name on invalid donation amount edit * direct call to render doesn't load @items causing partial to be unable to match item IDs to item names, resulting in displaying numbers * replace with redirect to edit --- app/controllers/donations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/donations_controller.rb b/app/controllers/donations_controller.rb index 0771597fac..c6c2966fc8 100644 --- a/app/controllers/donations_controller.rb +++ b/app/controllers/donations_controller.rb @@ -84,7 +84,7 @@ def update redirect_to donations_path rescue => e flash[:alert] = "Error updating donation: #{e.message}" - render "edit" + redirect_back(fallback_location: edit_donation_path) end def destroy