0.0
No commit activity in last 3 years
No release in over 3 years
Country tools for Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

CountryTools¶ ↑

Installation¶ ↑

gem 'country_tools'

Supported languages¶ ↑

  • French

  • English

  • Spanish

Example¶ ↑

Store only codes into you database.

Get all possible country codes :

CountryTools.get_all_codes

Get the name of a country by code [i18n aware] :

CountryTools.name('BE') #=> 'Belgium'

Ask if a country is in European Union :

CountryTools.in_eu?('BE') #=> true

Get options for a select (inside form_for) :

<%= f.select :country_code, CountryTools.options_for_select %>

Contributors¶ ↑

License¶ ↑

Copyright © 2011-2019 Aurélien Malisart, released under the MIT license.