Git Product home page Git Product logo

country-select's Introduction

Country-Select

Provides a simple helper to get an HTML select list of countries. The list of countries comes from the ISO 3166 standard. While it is a relatively neutral source of country names, it may still offend some users.

Users are strongly advised to evaluate the suitability of this list given their user base.

Latest Changes

1.1.1

  • Fixed incompatibility with Rails 3.2.2 (thanks to jmazzi)

1.1.0

  • Updated the country list to change the name of Libyan Arab Jamahiriya to Libya according to the latest ISO 3166 newsletter
  • A country in the priority list will be selected there and not in the main list (thanks to yyyc514)
  • Removed relics from the pre-gem days

Installation

Install as a gem using

gem install country-select

Or put the following in your Gemfile

gem 'country-select'

Example

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:

country_select("user", "country_name", [ "United Kingdom", "France", "Germany" ])

Version History

  • 1.0.5 - runtime error raised if any of the user-supplied priority countries do not correlate with those in the main country list.
  • 1.0.4 - updated the country list to match the latest ISO 3166 specification
  • 1.0.3 - changed gem name from 'iso-3166-country-select' to just 'country-select'
  • 1.0.2 - forked the plugin and made it into a gem

Copyright (c) 2008 Michael Koziarski, released under the MIT license

country-select's People

Contributors

dburt avatar jamesds avatar jb-san avatar jmazzi avatar joshgoebel avatar nzkoz avatar purcell avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.