diff --git a/CHANGELOG b/CHANGELOG index 6c7ca2b95..309958482 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Default the Location to use the :alpha2 country code format [cody] * Add configurable timeouts from Active Merchant [cody] * Update xml_node.rb from XML Node [cody] * Update requires_parameters from ActiveMerchant [cody] diff --git a/lib/active_shipping/shipping/location.rb b/lib/active_shipping/shipping/location.rb index 3acdc91e1..2d056600b 100644 --- a/lib/active_shipping/shipping/location.rb +++ b/lib/active_shipping/shipping/location.rb @@ -69,7 +69,7 @@ def self.from(object, options={}) self.new(attributes.update(options)) end - def country_code(format) + def country_code(format = :alpha2) @country.nil? ? nil : @country.code(format).first.value end