Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


multiple addresses on same order #1

bpokosh opened this Issue · 1 comment

2 participants


Could this be used for multiple addresses on the same model? For example, a billing address and shipping address.


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.