Created
December 15, 2014 09:44
-
-
Save andrest/a64649f128af1bd368ee to your computer and use it in GitHub Desktop.
checkout_controller_decorator.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spree::CheckoutController.class_eval do | |
def before_address | |
# If the user has a default address, a callback takes care of setting | |
# that; but if he doesn't, we need to build an empty one here. | |
# Regardless of checkout steps, build a shipping address | |
@order.bill_address ||= Spree::Address.build_default | |
@order.ship_address ||= Spree::Address.build_default | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment