Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple addresses on same order #1

Open
bpokosh opened this issue Oct 8, 2009 · 1 comment
Open

multiple addresses on same order #1

bpokosh opened this issue Oct 8, 2009 · 1 comment

Comments

@bpokosh
Copy link

bpokosh commented Oct 8, 2009

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

@tsnow
Copy link

tsnow commented May 25, 2011

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants