country_select 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +40 -0
- data/lib/country_select/version.rb +1 -1
- metadata +4 -4
- data/README +0 -14
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
Country-Select
|
2
|
+
|
3
|
+
Provides a simple helper to get an HTML select list of countries. The list of countries comes
|
4
|
+
from the ISO 3166 standard. While it is a relatively neutral source of country names, it may
|
5
|
+
still offend some users.
|
6
|
+
|
7
|
+
Users are strongly advised to evaluate the suitability of this list given their user base.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Install as a gem using
|
12
|
+
|
13
|
+
gem install country-select
|
14
|
+
|
15
|
+
Or put the following in your Gemfile
|
16
|
+
|
17
|
+
gem 'country-select'
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
Simple use supplying model and attribute as parameters:
|
22
|
+
|
23
|
+
country_select("user", "country_name")
|
24
|
+
|
25
|
+
Supplying priority countries to be placed at the top of the list:
|
26
|
+
|
27
|
+
country_select("user", "country_name", [ "United Kingdom", "France", "Germany" ])
|
28
|
+
|
29
|
+
Specifying which country to be selected:
|
30
|
+
United Kingdom will be selected.
|
31
|
+
country_select("user", "country_name", [ "+United Kingdom+", "France", "Germany" ])
|
32
|
+
|
33
|
+
Example in a Rails form:
|
34
|
+
Full list, with New Zealand Australia and United Kingdom prioritized (New Zealand selected
|
35
|
+
by default)
|
36
|
+
<%= country_select(:player, :nationality, [ "+New Zealand+", "Australia", "United Kingdom" ])
|
37
|
+
%>
|
38
|
+
|
39
|
+
|
40
|
+
Copyright (c) 2008 Michael Koziarski, released under the MIT license
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: country_select
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03
|
12
|
+
date: 2012-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Provides a simple helper to get an HTML select list of countries. The
|
15
15
|
list of countries comes from the ISO 3166 standard. While it is a relatively neutral
|
@@ -23,7 +23,7 @@ files:
|
|
23
23
|
- .gitignore
|
24
24
|
- Gemfile
|
25
25
|
- MIT-LICENSE
|
26
|
-
- README
|
26
|
+
- README.md
|
27
27
|
- Rakefile
|
28
28
|
- country_select.gemspec
|
29
29
|
- lib/country_select.rb
|
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
50
|
rubyforge_project: country_select
|
51
|
-
rubygems_version: 1.8.
|
51
|
+
rubygems_version: 1.8.23
|
52
52
|
signing_key:
|
53
53
|
specification_version: 3
|
54
54
|
summary: Country Select Plugin
|
data/README
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
CountrySelect
|
2
|
-
=============
|
3
|
-
|
4
|
-
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 will still offend some users.
|
5
|
-
|
6
|
-
Users are strongly advised to evaluate the suitability of this list given their user base.
|
7
|
-
|
8
|
-
Example
|
9
|
-
=======
|
10
|
-
|
11
|
-
country_select("user", "country_name")
|
12
|
-
|
13
|
-
|
14
|
-
Copyright (c) 2008 Michael Koziarski, released under the MIT license
|