diff options
Diffstat (limited to 'app/controllers/services/addresses/address_services_base.rb')
-rw-r--r-- | app/controllers/services/addresses/address_services_base.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/app/controllers/services/addresses/address_services_base.rb b/app/controllers/services/addresses/address_services_base.rb deleted file mode 100644 index 18e13aa..0000000 --- a/app/controllers/services/addresses/address_services_base.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -module Services - module Addresses - # The base class for all addresses' services. - class AddressServicesBase - def initialize(user_account, params) - @user_account = user_account - @params = params - end - - private - - def already_existing_address - @already_existing_address ||= Address.find_by(@params) - end - - def add_address_to_user_addresses - already_existing_address.user_accounts << @user_account - already_existing_address.save - end - end - end -end |