uncharted 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/uncharted/extensions/rails.rb +7 -2
- data/lib/uncharted/version.rb +1 -1
- metadata +14 -14
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,11 @@ module ActionView
|
|
8
8
|
InstanceTag.new(object, method, self, options.delete(:object)).to_country_select_tag(priority_countries, options, html_options)
|
9
9
|
end
|
10
10
|
|
11
|
+
# Return select and option tags for the given object and method, using country_options_for_select to generate the list of option tags.
|
12
|
+
def teritory_select(object, method, priority_territories = nil, options = {}, html_options = {})
|
13
|
+
InstanceTag.new(object, method, self, options.delete(:object)).to_territory_select_tag(priority_territories, options, html_options)
|
14
|
+
end
|
15
|
+
|
11
16
|
# Returns a string of option tags for pretty much any country in the world. Supply a country name as +selected+ to
|
12
17
|
# have it marked as the selected option tag. You can also supply an array of countries as +priority_countries+, so
|
13
18
|
# that they will be listed above the rest of the (long) list.
|
@@ -31,14 +36,14 @@ module ActionView
|
|
31
36
|
territory_options = ""
|
32
37
|
|
33
38
|
if priority_territories
|
34
|
-
territory_options += options_from_collection_for_select(Territory.find(priority_territories), :
|
39
|
+
territory_options += options_from_collection_for_select(Territory.find(priority_territories), :code, :name, selected)
|
35
40
|
territory_options += "<option value=\"\" disabled=\"disabled\">-------------</option>\n"
|
36
41
|
# prevents selected from being included twice in the HTML which causes
|
37
42
|
# some browsers to select the second selected option (not priority)
|
38
43
|
# which makes it harder to select an alternative priority country
|
39
44
|
selected = nil if priority_territories.include?(selected)
|
40
45
|
end
|
41
|
-
territory_options + options_from_collection_for_select(Uncharted::Country.territories, :
|
46
|
+
territory_options + options_from_collection_for_select(Uncharted::Country.territories, :code, :name, selected)
|
42
47
|
end
|
43
48
|
|
44
49
|
end
|
data/lib/uncharted/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uncharted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152558540 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152558540
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: minitest
|
27
|
-
requirement: &
|
27
|
+
requirement: &2152558060 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2152558060
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: purdytest
|
38
|
-
requirement: &
|
38
|
+
requirement: &2152557600 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2152557600
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: simplecov
|
49
|
-
requirement: &
|
49
|
+
requirement: &2152557060 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2152557060
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: simplecov-rcov
|
60
|
-
requirement: &
|
60
|
+
requirement: &2152556600 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2152556600
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
|
-
requirement: &
|
71
|
+
requirement: &2152556180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2152556180
|
80
80
|
description: Provide ISO 3166 codes and english name for countries and their political
|
81
81
|
divisions
|
82
82
|
email:
|