spree_core 5.2.6 → 5.2.7
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 +4 -4
- data/app/models/spree/order/address_book.rb +12 -4
- data/lib/spree/core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 729147132263dcf0c7d05f60e13fa6aeaa24a38625a5ef2cf9c749f1791c238c
|
|
4
|
+
data.tar.gz: 9493863773080c567924e9d8615b9741c4412f73857f05070a865ac53ff294a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7394275107208ee5f2a30b065cf9a8e131355d440b74dcc7fd95fe9d2114462f578a3c9722121d826bfa2458f4543b7e8933d477abcca4e05404175d293ea13
|
|
7
|
+
data.tar.gz: f1168bd875c177d05a28d515488d8f0dcb0abe88749279d8c07837bf9d7e53526887e85ccfca9b1dc1322122ee95c6b43ad3955297a207e9d784a606bce0b723
|
|
@@ -14,13 +14,17 @@ module Spree
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def bill_address_id=(id)
|
|
17
|
+
return if bill_address_id == id
|
|
18
|
+
|
|
17
19
|
address = Spree::Address.find_by(id: id)
|
|
18
|
-
|
|
20
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
21
|
+
if address && user_id.present? && address.user_id == user_id
|
|
19
22
|
self['bill_address_id'] = address.id
|
|
20
|
-
bill_address.reload
|
|
21
23
|
else
|
|
22
24
|
self['bill_address_id'] = nil
|
|
23
25
|
end
|
|
26
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
27
|
+
reset_bill_address
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
def bill_address_attributes=(attributes)
|
|
@@ -29,13 +33,17 @@ module Spree
|
|
|
29
33
|
end
|
|
30
34
|
|
|
31
35
|
def ship_address_id=(id)
|
|
36
|
+
return if ship_address_id == id
|
|
37
|
+
|
|
32
38
|
address = Spree::Address.find_by(id: id)
|
|
33
|
-
|
|
39
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
40
|
+
if address && user_id.present? && address.user_id == user_id
|
|
34
41
|
self['ship_address_id'] = address.id
|
|
35
|
-
ship_address.reload
|
|
36
42
|
else
|
|
37
43
|
self['ship_address_id'] = nil
|
|
38
44
|
end
|
|
45
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
46
|
+
reset_ship_address
|
|
39
47
|
end
|
|
40
48
|
|
|
41
49
|
def ship_address_attributes=(attributes)
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.
|
|
4
|
+
version: 5.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean Schofield
|
|
@@ -1704,9 +1704,9 @@ licenses:
|
|
|
1704
1704
|
- BSD-3-Clause
|
|
1705
1705
|
metadata:
|
|
1706
1706
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
1707
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.
|
|
1707
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.7
|
|
1708
1708
|
documentation_uri: https://docs.spreecommerce.org/
|
|
1709
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.2.
|
|
1709
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.2.7
|
|
1710
1710
|
rdoc_options: []
|
|
1711
1711
|
require_paths:
|
|
1712
1712
|
- lib
|