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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b29d74d59a97f8495f964a6cf603c3a6d6c5fe9
|
4
|
+
data.tar.gz: 55e0bdee49dffebbe95c85ea115da785d48b38d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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) &&
|
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
|
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) &&
|
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
|
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
|
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
|
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
|
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}
|
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.
|
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-
|
11
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|