Join Slack
Powered by
How do I save a Spree::Address to the users Addres...
# support
v
victor
07/26/2023, 6:59 PM
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
Jared Norman
07/26/2023, 7:02 PM
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
Jared Norman
07/26/2023, 7:03 PM
The short answer is that you can use
user.ship_address=
and
user.bill_address=
v
victor
07/26/2023, 8:56 PM
Mm. I created a bill_address_attributes for both and asigning it to the user works for ship_address but nt for bill address.
Open in Slack
Previous
Next