Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onomojo/i18n_country_select
A Rails select form helper using country codes for I18n translations
https://github.com/onomojo/i18n_country_select
Last synced: 3 months ago
JSON representation
A Rails select form helper using country codes for I18n translations
- Host: GitHub
- URL: https://github.com/onomojo/i18n_country_select
- Owner: onomojo
- License: mit
- Fork: true (manafire/country_code_select)
- Created: 2012-03-19T23:14:12.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2022-02-14T07:46:05.000Z (almost 3 years ago)
- Last Synced: 2024-04-23T08:47:08.874Z (9 months ago)
- Language: Ruby
- Homepage:
- Size: 87.9 KB
- Stars: 28
- Watchers: 4
- Forks: 33
- Open Issues: 5
-
Metadata Files:
- Readme: README.rdoc
- Changelog: CHANGELOG.md
- License: MIT-LICENSE
Awesome Lists containing this project
- awesome-rails-gem - i18n Country Code Select - I18n Country Code Select Form Helper for Rails 3 & 4. (View Helper / Omniauth)
README
{}[https://travis-ci.org/onomojo/i18n_country_select]
== Country Code Select
A simple country code select helper with I18n translations for the countries. Works exactly the same as country_select but uses country codes instead and has i18n translations for the country names.
NOTE: The old country_code_select repository that this one was forked from is outdated and no longer maintained. This i18_country_select repository is the most current.
== Installation
Put the following in your Gemfilegem 'i18n_country_select'
== Example
Simple use supplying model and attribute as parameters:country_code_select(:user, :country)
Supplying priority countries to be placed at the top of the list:
country_code_select(:user, :country, [[ 'US', 'United States' ], [ 'CA', 'Canada' ]])
Specifying different selected value:
country_code_select(:user, :country, [], selected: 'CA')
Based on the deprecated country_code_select by: Russ Smith ([email protected]) and Frank Wambutt ([email protected])
== License
MIT or GPL