You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You couldn't do so as it stands, but it's certainly possible to write your own apply_address_logic and a wrapper around address_parts which would allow you to do what you want.
However, having all the separate fields for a billing address and a shipping address in the same table might be a bit of a db-smell. If there were an addresses table into which your model had a billing foreign key and a shipping foreign key, then you could certainly call model.shipping_address.address_parts and model.billing_address.address_parts.
Then you'd only need to apply_address_logic the one time, in the Address model.
Could this be used for multiple addresses on the same model? For example, a billing address and shipping address.
The text was updated successfully, but these errors were encountered: