Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (14 sloc) 583 Bytes

Country-Code-Select

A country-select compatible country selector helper which uses ISO country codes.

Installation

Add this line to your application's Gemfile:

gem 'country-code-select'

And then execute:

$ bundle

Or install it yourself as:

$ gem install country-code-select

Usage

Simple use supplying model and attribute as parameters:

country_select("user", "country_name")

Supplying priority countries to be placed at the top of the list. Countries entered should be the country code.:

country_select("user", "country_name", [ "GB", "FR", "US" ])