effective_addresses 1.11.2 → 1.11.4

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
  SHA256:
3
- metadata.gz: e66533e87c7a7da2a8328a1adab981fa04b84fc694e9563dc7775a131953d167
4
- data.tar.gz: 1f5b37866d4ecd280033175ffb19752a3014bb90cc551d3368cd42b5f3cd422f
3
+ metadata.gz: fdee75d31b431c6efbde72fe1cd277cd95dce281445616a819a8559087d1401f
4
+ data.tar.gz: b0fb7c4babcb490b5ffc877c47d5f5e811411a8bf76524815646bb7e58fd8a8e
5
5
  SHA512:
6
- metadata.gz: aead11f98356d3cfe682606f761ee150414bd0e98c6932cce5657354bd5e8c8c1d14cd172db86dc0aa7dffc3f978656baef91402d52fbc6f10895de2f85ef1d3
7
- data.tar.gz: 9340f0b4ccff8dd533c0a045e089a11cfa0fb4af00a3ad62ad4a548582b74de4a6a997df5700db7e55dd02e5003420239611f689de120baea62e41f2f37f8813
6
+ metadata.gz: 65dea3c72e2738550087312d8134d641ca97d782966e5042f31e880ab57d056643a17217f4c171aba21b3a19862fa66cd08e276a2a835185c51455212121cc13
7
+ data.tar.gz: 701feaed5e27cac932a97aa5e3e8351a1a7c1f525479b54422c41d5a267172cc4752bab75f3ec5502fc53d62f3cb6b8c955cc58a2c281499e3b6d786dc31b552
@@ -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
- countries.unshift(*
66
- EffectiveAddresses.country_codes_priority.map do |code|
67
- country = Carmen::Country.coded(code)
68
- [country.name, country.code]
69
- end + [['-------------------', '-', disabled: :disabled]]
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
@@ -15,7 +15,7 @@
15
15
  wrapper: wrapper_options
16
16
 
17
17
  = fa.text_field :address1,
18
- label: 'Address',
18
+ label: (local_assigns[:label] || method.to_s.titleize),
19
19
  required: required,
20
20
  disabled: same_as_billing,
21
21
  wrapper: wrapper_options
@@ -1,3 +1,3 @@
1
1
  module EffectiveAddresses
2
- VERSION = '1.11.2'.freeze
2
+ VERSION = '1.11.4'.freeze
3
3
  end
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.2
4
+ version: 1.11.4
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-03-25 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails