effective_addresses 1.8.3 → 1.8.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
  SHA1:
3
- metadata.gz: 657cd274dfe063bcd3fb821c88385cccc827fab5
4
- data.tar.gz: 285737033853c79a7813b22f1f7f1b3c1846282f
3
+ metadata.gz: ff3f966afab7e2c3b8199c448af7fea1ceee0411
4
+ data.tar.gz: ff0c0b5f1b79f540088db80a4199204873ff6e1c
5
5
  SHA512:
6
- metadata.gz: 8d8e4ffb57497467499ed14e00198fc9a9dca2bd0e98a8bed2cbef0b75d1786626ab423081f402edda6d24d2ec3384f2d82c2d4ca5015b6e63c9edf58b97f0d1
7
- data.tar.gz: 2c3baf1a628670734d026be960f264fedfeb840333495ea7e991c37caa7b8926473d67fb56f18409335b213aacf7ce7b287232f407c22f8221e031521c4af248
6
+ metadata.gz: aafa438364c21b562ab22fbfd5456f5ea760aeec032d243daa5f14571e9cb6cb1e77c62b249425b6a7554a4230648f2ff78cf4975328c0f6bbeb1eb78225e011
7
+ data.tar.gz: 12fc4c7ad7132879f28e982aa7e4a658879c5e670f2d1eac59db063997e09db6a7d17a2a4389b0dc320f33751385085261487bbc3ead260c4cdfd84b3bd90bcb
@@ -5,6 +5,7 @@ $(document).on 'change', "input[name$='[shipping_address][shipping_address_same_
5
5
  div[class*='_shipping_address_full_name'],
6
6
  div[class*='_shipping_address_address1'],
7
7
  div[class*='_shipping_address_address2'],
8
+ div[class*='_shipping_address_address3'],
8
9
  div[class*='_shipping_address_city'],
9
10
  div[class*='_shipping_address_country_code'],
10
11
  div[class*='_shipping_address_state_code'],
@@ -91,6 +91,7 @@ module ActsAsAddressable
91
91
  existing.full_name = address.full_name
92
92
  existing.address1 = address.address1
93
93
  existing.address2 = address.address2
94
+ existing.address3 = address.address3 if address.respond_to?(:address3)
94
95
  existing.city = address.city
95
96
  existing.state_code = address.state_code
96
97
  existing.country_code = address.country_code
@@ -116,6 +117,7 @@ module ActsAsAddressable
116
117
  existing.full_name = address.full_name
117
118
  existing.address1 = address.address1
118
119
  existing.address2 = address.address2
120
+ existing.address3 = address.address3 if address.respond_to?(:address3)
119
121
  existing.city = address.city
120
122
  existing.state_code = address.state_code
121
123
  existing.country_code = address.country_code
@@ -111,6 +111,7 @@ module Effective
111
111
  output += "#{full_name}\n" if full_name.present?
112
112
  output += "#{address1}\n" if address1.present?
113
113
  output += "#{address2}\n" if address2.present?
114
+ output += "#{address3}\n" if respond_to?(:address3) && address3.present?
114
115
  output += [city.presence, state_code.presence, " #{postal_code.presence}"].compact.join(' ')
115
116
  output += "\n"
116
117
  output += country.to_s
@@ -8,9 +8,16 @@
8
8
 
9
9
  = address.address1
10
10
  %br
11
+
11
12
  - if address.address2.present?
12
13
  = address.address2
13
14
  %br
15
+
16
+ - if address.respond_to?(:address3) && address.address3.present?
17
+ = address.address3
18
+ %br
19
+
14
20
  = [address.city.presence, address.state_code.presence, ' ' + address.postal_code.presence].compact.join(' ').html_safe
21
+
15
22
  %br
16
23
  = address.country.to_s
@@ -26,6 +26,13 @@
26
26
  disabled: same_as_billing,
27
27
  wrapper: wrapper_options
28
28
 
29
+ - if fa.object.respond_to?(:address3)
30
+ = fa.text_field :address3,
31
+ label: false,
32
+ required: false,
33
+ disabled: same_as_billing,
34
+ wrapper: wrapper_options
35
+
29
36
  = fa.text_field :city,
30
37
  required: required,
31
38
  disabled: same_as_billing,
@@ -18,6 +18,9 @@
18
18
  - when :address2
19
19
  = fa.input :address2, :label => false
20
20
 
21
+ - when :address3
22
+ = fa.input :address3, :label => false
23
+
21
24
  - when :city
22
25
  = fa.input :city, :placeholder => 'City'
23
26
 
@@ -5,6 +5,7 @@ en:
5
5
  full_name: Full name
6
6
  address1: Address 1
7
7
  address2: Address 2
8
+ address3: Address 3
8
9
  country_code: Country
9
10
  state_code: Province / State
10
11
  postal_code: Postal / Zip code
@@ -7,6 +7,10 @@ class CreateEffectiveAddresses < ActiveRecord::Migration[4.2]
7
7
  t.string :full_name
8
8
  t.string :address1
9
9
  t.string :address2
10
+
11
+ # Uncomment this if you want 3 address fields
12
+ # t.string :address3
13
+
10
14
  t.string :city
11
15
  t.string :state_code
12
16
  t.string :country_code
@@ -1,3 +1,3 @@
1
1
  module EffectiveAddresses
2
- VERSION = '1.8.3'.freeze
2
+ VERSION = '1.8.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.8.3
4
+ version: 1.8.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: 2018-03-27 00:00:00.000000000 Z
11
+ date: 2018-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.4.5.1
107
+ rubygems_version: 2.5.2.3
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Extend any ActiveRecord object to have one or more named addresses. Includes