effective_orders 1.2.9 → 1.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c71ba80f793adc23f37e25de7767711398b01ab5
4
- data.tar.gz: cf193e4c089fd19bf330ae3ca3fc5fe7bdb2d762
3
+ metadata.gz: 3b29d74d59a97f8495f964a6cf603c3a6d6c5fe9
4
+ data.tar.gz: 55e0bdee49dffebbe95c85ea115da785d48b38d9
5
5
  SHA512:
6
- metadata.gz: 398fcd93fa0a67539a2426c1b7fe2a77bf75279861c793d5eaac92ab6ac157bf1264e5d3be2d9771825c75f3116d04cdc88af9ca98334bcb86c02e6ab08aa6a2
7
- data.tar.gz: cf05526fff7c2fd3a92f42f403750d547ce36fb3fc7b5eab0360f7c036f8a0b72a0d87d0cf859108ad53925c4396ddc04d62c050bae97b8aa3f8069f62c81a79
6
+ metadata.gz: 53c79475f15bfe79c2c7b937eff479cef6324cfa1bf9bd2d9a3fe28a52466f791d28c3867c3fb624ed8881673ff730c0e769fefaeb7c74428f1349862016c826
7
+ data.tar.gz: 86d6f55c1486df3d90bf1bdc7763e60d659e078a1ae5e5f48d37cd4090cd87e3aebf9c9d2bdc0925f0c36bfe63e5d0d3859fea9ed3e554394580f7893bd11aec
@@ -96,14 +96,14 @@ module Effective
96
96
  def user=(user)
97
97
  super
98
98
 
99
- if user.respond_to?(:billing_address) && EffectiveOrders.require_billing_address
99
+ if user.respond_to?(:billing_address) && (billing_address.blank? || billing_address.empty?)
100
100
  self.billing_address = user.billing_address
101
- self.billing_address.full_name = billing_name if self.billing_address.present? && self.billing_address.full_name.blank?
101
+ self.billing_address.full_name = billing_name if billing_address.present? && billing_address.full_name.blank?
102
102
  end
103
103
 
104
- if user.respond_to?(:shipping_address) && EffectiveOrders.require_shipping_address
104
+ if user.respond_to?(:shipping_address) && (shipping_address.blank? || shipping_address.empty?)
105
105
  self.shipping_address = user.shipping_address
106
- self.shipping_address.full_name = billing_name if self.shipping_address.present? && self.shipping_address.full_name.blank?
106
+ self.shipping_address.full_name = billing_name if shipping_address.present? &&shipping_address.full_name.blank?
107
107
  end
108
108
  end
109
109
 
@@ -2,13 +2,13 @@
2
2
  %thead
3
3
  %tr
4
4
  %th{:style => 'text-align: left;'}= "#{order.purchased? ? 'Sold to' : 'Bill to'}"
5
- - if EffectiveOrders.require_shipping_address && order.shipping_address.present?
5
+ - if order.shipping_address.present? && !order.shipping_address.empty?
6
6
  %th{:style => 'text-align: left;'} Ship to
7
7
 
8
8
  %tbody
9
9
  %tr
10
10
  %td{:style => 'text-align: left;'}
11
- - if EffectiveOrders.require_billing_address && order.billing_address.present?
11
+ - if order.billing_address.present? && !order.billing_address.empty?
12
12
  = render :partial => 'effective/addresses/address', :locals => {:address => order.billing_address, :email => order.user.email}
13
13
  - else
14
14
  = order.billing_name
@@ -16,6 +16,6 @@
16
16
  = mail_to(order.user.email)
17
17
  %br
18
18
 
19
- - if EffectiveOrders.require_shipping_address && order.shipping_address.present?
19
+ - if order.shipping_address.present? && !order.shipping_address.empty?
20
20
  %td{:style => 'text-align: left;'}
21
21
  = render :partial => 'effective/addresses/address', :locals => {:address => order.shipping_address}
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.2.9'.freeze
2
+ VERSION = '1.2.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.10
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: 2015-02-03 00:00:00.000000000 Z
11
+ date: 2015-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails