effective_addresses 1.6.2 → 1.6.3

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: d32d89c74a1a34f8e5041c39c032d008962c1652
4
- data.tar.gz: efec422df8c03983d1c20e3ba25cafd55af0315a
3
+ metadata.gz: 5a8531e0a31f4d58907f8bcb3bacaaae1af4cfb7
4
+ data.tar.gz: aae93b337212735a1b73c96a5c29563c3a2beb24
5
5
  SHA512:
6
- metadata.gz: 1f99a65cdf7f530756ff3f661ef841f3442177b2ae0ff56bc328cfbf850ac82ab319dc9197821222302c552799e6fe4ac5c11d01d29ad7191777286464645bd2
7
- data.tar.gz: b8c8753e538ce28192d20dd65f666a3c906ddb6a09599055a0da0a19cbc28b737515b94585fae863af3b430c19a8618b477ed0ad035254c88f7f67e15e4183f7
6
+ metadata.gz: 0884e243f405c371070fe834fa76bf6b25783320c9733bd1068238130377ca2a048719e0f977c4712db553a6fcc1ca7ecafc44d4d3a9c5e8f079e69ce0424bc1
7
+ data.tar.gz: b709b990babe0e6a6f1ba171afc0e7e700b16e8831cb29564af184ef7bd0f809bfbb15b81b7e921f11ba84e374782d909f3905cf80871aba04db1df8f47eec03
@@ -2,6 +2,7 @@ $(document).on 'change', "input[name$='[shipping_address][shipping_address_same_
2
2
  $obj = $(event.currentTarget)
3
3
 
4
4
  shipping_fields = $obj.closest('form').find("
5
+ div[class*='_shipping_address_full_name'],
5
6
  div[class*='_shipping_address_address1'],
6
7
  div[class*='_shipping_address_address2'],
7
8
  div[class*='_shipping_address_city'],
@@ -8,7 +8,7 @@ module Effective
8
8
  if @subregions.present?
9
9
  render :partial => 'effective/addresses/subregions'
10
10
  else
11
- render :text => "<option value=''>None Available</option>"
11
+ render :body => "<option value=''>None Available</option>"
12
12
  end
13
13
  end
14
14
  end
@@ -123,8 +123,11 @@ module Effective
123
123
  end
124
124
 
125
125
  def shipping_address_same_as_billing?
126
- ::ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(self.shipping_address_same_as_billing)
126
+ if defined?(::ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES) # Rails 5
127
+ ::ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(self.shipping_address_same_as_billing)
128
+ else
129
+ ActiveRecord::Type::Boolean.new.cast(self.shipping_address_same_as_billing)
130
+ end
127
131
  end
128
-
129
132
  end
130
133
  end
@@ -13,10 +13,10 @@
13
13
  = fa.input :full_name, :required => true, :label => 'Full name', :placeholder => 'Full name'
14
14
 
15
15
  - when :address1
16
- = fa.input :address1, :placeholder => 'Address', :label => "Address 1"
16
+ = fa.input :address1, :placeholder => 'Address', :label => "Address"
17
17
 
18
18
  - when :address2
19
- = fa.input :address2, :label => 'Address 2'
19
+ = fa.input :address2, :label => false
20
20
 
21
21
  - when :city
22
22
  = fa.input :city, :placeholder => 'City'
@@ -18,12 +18,14 @@
18
18
 
19
19
  - when :address1
20
20
  = fa.input :address1,
21
+ label: 'Address',
21
22
  required: required,
22
23
  disabled: shipping_address_same_as_billing,
23
24
  wrapper_html: { style: ('display: none;' if shipping_address_same_as_billing) }
24
25
 
25
26
  - when :address2
26
27
  = fa.input :address2,
28
+ label: false,
27
29
  required: false,
28
30
  disabled: shipping_address_same_as_billing,
29
31
  wrapper_html: { style: ('display: none;' if shipping_address_same_as_billing) }
@@ -1,3 +1,3 @@
1
1
  module EffectiveAddresses
2
- VERSION = '1.6.2'.freeze
2
+ VERSION = '1.6.3'.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.6.2
4
+ version: 1.6.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: 2016-04-15 00:00:00.000000000 Z
11
+ date: 2016-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails