diff options
Diffstat (limited to 'app/controllers/services/create_address_service.rb')
-rw-r--r-- | app/controllers/services/create_address_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/services/create_address_service.rb b/app/controllers/services/create_address_service.rb index 5ded4f7..431ccd1 100644 --- a/app/controllers/services/create_address_service.rb +++ b/app/controllers/services/create_address_service.rb @@ -7,7 +7,9 @@ module Services def call if already_existing_address.nil? - @address = @user_account.addresses.create(@params) + @address = Address.new(@params) + @address.user_accounts << @user_account + @address.save else add_address_to_user_addresses @address = already_existing_address |