README.rdoc in localized_country_select-0.9.2 vs README.rdoc in localized_country_select-0.9.3

- old
+ new

@@ -16,28 +16,28 @@ Don't forget to restart the application when you add new locale. ActionView helper code is adapted from Rails' default +country_select+ plugin (previously in core). See http://github.com/rails/country_select/tree/master/lib/country_select.rb -== Rails 3 +== Rails 3 / Rails 4 In your Gemfile add: - gem 'localized_country_select', '>= 0.9.2' + gem 'localized_country_select', '>= 0.9.3' == Rails 2.3 No longer supported, but you can still use old version of gem. In environment.rb add - config.gem 'localized_country_select, , :version => '0.0.1' + config.gem 'localized_country_select', :version => '0.0.1' == Example Show full country names: - <%= localized_country_select(:user, :country, [], {:include_blank => 'Please choose...')} %> + <%= localized_country_select(:user, :country, [], {:include_blank => 'Please choose...'}) %> will become: <select name="user[country]" id="user_country"> <option value="">Please choose...</option> @@ -48,11 +48,11 @@ </select> Show only country codes: - <%= localized_country_select(:user, :country, [], {:include_blank => 'Please choose...', :description => :abbreviated)} + <%= localized_country_select(:user, :country, [], {:include_blank => 'Please choose...', :description => :abbreviated}) %> will become: <select name="user[country]" id="user_country"> <option value="">Please choose...</option> @@ -62,9 +62,14 @@ <option value="ZW">ZW</option> </select> for the <tt>en</tt> locale. + + +You can exclude countries by code using the exclude option (a single code or an array of country codes): + + localized_country_select(:user, :country, [], {:exclude => [:ZZ, :US]}) == Formtastic and SimpleForm Gem supports (via alias_method) both formtastic and simple_form :country input