How do I save a Spree::Address to the users Addres...
# support
v
How do I save a Spree::Address to the users AddressBook (both billing and shipping)? Clearly setting the ID and then saving is not working haha.
j
You'll want to read through this code, which governs how this all works: https://github.com/solidusio/solidus/blob/main/core/app/models/concerns/spree/user_address_book.rb
The short answer is that you can use
user.ship_address=
and
user.bill_address=
v
Mm. I created a bill_address_attributes for both and asigning it to the user works for ship_address but nt for bill address.