effective_addresses 1.11.2 → 1.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/effective_addresses_helper.rb +10 -6
- data/lib/effective_addresses/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 875531cb4889a5a4bac22dfee65f6e03c02cb58835f132eddcce745e19e4581e
|
4
|
+
data.tar.gz: 81d53f0f6a5d82eccf5af47b301efff084ae3c0751ff434a8a03a73a66a7ac9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7140b689a093ba423b5fb253145fecf750742ffa4a0bf5334f526f1b9d2be0209efcdfd53d87feb8858bd4d08e74554a01fe01786ad0e324749ac0e79c7de481
|
7
|
+
data.tar.gz: 474a68e289138b8418cf3808ae19eeef1e18a78717e2658ac2a1377eff7142e289f7de20db2ba678b0892c91baad515b24754e49e7e06c5d04a5cf69cc32b4b5
|
@@ -62,12 +62,16 @@ module EffectiveAddressesHelper
|
|
62
62
|
countries = countries.map { |c| [c.name, c.code] }.sort! { |a, b| a.first <=> b.first }
|
63
63
|
|
64
64
|
if regions.blank? && EffectiveAddresses.country_codes_priority.present?
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
)
|
65
|
+
priorities = EffectiveAddresses.country_codes_priority.map do |code|
|
66
|
+
country = Carmen::Country.coded(code)
|
67
|
+
[country.name, country.code]
|
68
|
+
end
|
69
|
+
|
70
|
+
unless EffectiveAddresses.country_codes.kind_of?(Array)
|
71
|
+
priorities << ['-------------------', '-', disabled: :disabled]
|
72
|
+
end
|
73
|
+
|
74
|
+
countries.unshift(*priorities)
|
71
75
|
end
|
72
76
|
|
73
77
|
# Special behaviour if the address has CAN, we treat it as CA
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_addresses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|