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

Two-letter codes not unique #2

Closed
croaky opened this issue Jun 4, 2009 · 1 comment
Closed

Two-letter codes not unique #2

croaky opened this issue Jun 4, 2009 · 1 comment

Comments

@croaky
Copy link

croaky commented Jun 4, 2009

Alberta, British Columbia, South Carolina are all problematic.

Carmen::state_name('BC')
=> nil
Carmen::state_name('MA')
=> "Massachusetts"
Carmen::state_name('AB')
=> nil

Not sure how state_name is supposed to be used if so many examples return bad results.

@jim
Copy link
Collaborator

jim commented Jun 5, 2009

You'll need to specify the country to use anything other than the default, which is the US:

>> Carmen::state_name('AB', 'CA') => 'Alberta'

Or you can set Canada to the default, and omit the second argument:

>> Carmen.default_country = 'CA'
>> Carmen::state_name('AB') => "Alberta"

The docs aren't the best, but I think they cover this pretty well. Suggestions obviously welcomed!

This issue was closed.
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