countryselect0r
DESCRIPTION:
Fork of the country-select (version 1.1.1) gem by Michael Koziarski and James Dean Shepherd. With mashup code from the iso-country-select (version 0.1.4) gem by Maurizio Casimirri.
FEATURES/PROBLEMS:
Stores countries as ISO 3166 codes instead of English strings Accepts a list of priority countries Queries i18n for localized country names Works with Formtastic and ActiveAdmin
SYNOPSIS:
# When using formtastic, it will usually detect the "country" column for you.
f.input :country
# Specify it yourself
f.input :my_country_column, :as => :country
# Specify a list of priority countries
f.input :country, { :priority_countries => [ "NLD", "BEL", "DEU", "LUX" ] }
REQUIREMENTS:
- Ruby
- Rails
This gem was tested with Ruby 1.9.3p194 and Rails 3.2.9.
INSTALL:
gem install countryselect0r
Add this line to your config/application.rb:
require 'countryselect0r/base'
LICENSE:
(The MIT License)
Copyright © 2012 Commander Johnson <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.