au_state_select 1.4 → 1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/au_state_select/form_tag_helper.rb +7 -2
- data/lib/au_state_select/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c12316e8611557b408db668156b5cccfcbaec1a
|
4
|
+
data.tar.gz: 92b938b2e94796106348af7fbb17ba6c670ce8a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3241ca2cba40ebabc19840b41dcc0da2a3e922c2f6a6adfdaafa95c9acc576b2b40b2ad5f6ef97ff3b48fc6e956011019a4d921dc9176f203421eca6975d103
|
7
|
+
data.tar.gz: 7b5781b340d05d80ace629f082c1d135b00e5afe12dcc56b59f948a68d389f76bd29d1d42cb99653c46aa4a787d523fee851c579616a618785a4607fa3d824b9
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module AUStateSelect
|
2
2
|
module FormTagHelper
|
3
|
-
def state_select_tag(name,
|
3
|
+
def state_select_tag(name, options = {}, html_options = {})
|
4
4
|
|
5
5
|
states = ""
|
6
6
|
|
@@ -18,7 +18,12 @@ module AUStateSelect
|
|
18
18
|
else
|
19
19
|
[['Australian Capital Territory', 'ACT'],['New South Wales', 'NSW'],['Northern Territory', 'NT'],['Queensland', 'QLD'],['South Australia', 'SA'],['Tasmania', 'TAS'],['Victoria', 'VIC'],['Western Australia', 'WA']]
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
|
+
if options.key?(:value) and options[:value]
|
23
|
+
states = states + options_for_select(select_options, options[:value])
|
24
|
+
else
|
25
|
+
states = states + options_for_select(select_options)
|
26
|
+
end
|
22
27
|
|
23
28
|
html_options = html_options.stringify_keys
|
24
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: au_state_select
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.5'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.4.
|
81
|
+
rubygems_version: 2.4.8
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Provides a simple helper to get an HTML select list of Australia states.
|