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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c76f2217d6874c015863f812a761352cd169575
4
- data.tar.gz: a068375163474a7f7775c9a4924affeb6687247d
3
+ metadata.gz: 1c12316e8611557b408db668156b5cccfcbaec1a
4
+ data.tar.gz: 92b938b2e94796106348af7fbb17ba6c670ce8a8
5
5
  SHA512:
6
- metadata.gz: 0fc8dd42e967adc8fbf5426b2f4dabb2e45892ce9f9c047ed96d0ec32fdbc916f16c9fdde00280ed341a73512763bd7b094744dfc33b04a9f934537c64fc2be2
7
- data.tar.gz: b15e61bb9f5ea7f9a41b30ab304b83ea95cee43e581f0947a9864ed7a2d4cb2547b901ff2eabfaff2392e1096af0e861820546715943ae235bdeb078e904c756
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, priority_countries = nil, options = {}, html_options = {})
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
- states = states + options_for_select(select_options)
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
 
@@ -1,3 +1,3 @@
1
1
  module AuStateSelect
2
- VERSION = "1.4"
2
+ VERSION = "1.5"
3
3
  end
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'
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-15 00:00:00.000000000 Z
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.3
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.