Skip to content

Commit

Permalink
GREEN fix rubyforgood#4172 displays item name on invalid donation amo…
Browse files Browse the repository at this point in the history
…unt 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
  • Loading branch information
jimmyli97 committed Jun 27, 2024
1 parent fc9cdb5 commit db4570a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/donations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db4570a

Please sign in to comment.