From a4e461bccee482c40e69be9310ba12de5d7da59b Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Fri, 24 Mar 2023 20:34:23 -0600 Subject: Fixes de addresses_controller --- app/controllers/services/update_address_service.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/controllers/services/update_address_service.rb') diff --git a/app/controllers/services/update_address_service.rb b/app/controllers/services/update_address_service.rb index 9f1ce54..26a596e 100644 --- a/app/controllers/services/update_address_service.rb +++ b/app/controllers/services/update_address_service.rb @@ -19,6 +19,7 @@ module Services return :unprocessable_entity unless @address.update(@params) else add_address_to_user_addresses + @address.user_account_addresses.find_by(user_account_id: @user_account.id).destroy @address.destroy if @address.user_accounts.count.zero? @address = already_existing_address end -- cgit v1.2.3