bonobos/spree — pull request #65 by magnusvk (2014-08-01 20:57:48+00:00)
Title: Move default address logic to callbacks

Two advantages:
1. Centralizes this logic, as we want this to happen whether you create an order from frontend, backend or API.
2. Waits until the last possible moment to assign an address and will thus get the most recent default address, rather than the one at the time the cart was created.

This is analogous to [spree/spree#5108](https://github.com/spree/spree/pull/5108) which looks like it'll get into upstream master. Plus, it solves [this bug](https://trello.com/c/jrzsMmh4/207-bug-saved-addresses-don-t-always-present-in-ayr) where the association would sometimes not work for old carts.