Skip to content

Commit

Permalink
Default the Location to use the :alpha2 country code format
Browse files Browse the repository at this point in the history
  • Loading branch information
Cody Fauser committed Mar 11, 2009
1 parent 82b2a71 commit 029d7d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion lib/active_shipping/shipping/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 029d7d8

Please sign in to comment.