From 753bf8499ba5d8815db8d08a1dcf69caa20660cf Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sat, 1 Apr 2023 12:00:33 -0600 Subject: Mejora estructura del proyecto --- .../services/addresses/destroy_address_service.rb | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 app/controllers/services/addresses/destroy_address_service.rb (limited to 'app/controllers/services/addresses/destroy_address_service.rb') diff --git a/app/controllers/services/addresses/destroy_address_service.rb b/app/controllers/services/addresses/destroy_address_service.rb deleted file mode 100644 index 06c30df..0000000 --- a/app/controllers/services/addresses/destroy_address_service.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module Services - module Addresses - # The service for address deletion. - class DestroyAddressService < AddressServicesBase - def initialize(user_account, params, address) - super(user_account, params) - @address = address - end - - def call - UserAccountAddress.find_by(address_id: @address.id, user_account_id: @user_account.id).destroy - return unless @address.user_accounts.count.zero? - - @address.destroy - end - end - end -end -- cgit v1.2.3