effective_products 0.0.8 → 0.0.9

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
  SHA256:
3
- metadata.gz: a355433e74133bc2d4eb3217105b107bd7bda886da225da1a8a28aaa66b18ee8
4
- data.tar.gz: a4e568829f7d037dfe62993ed6b8540328fcf53a9b687c738fa6e9723c83886a
3
+ metadata.gz: 33912b031a749bc69286e6d5d04a85a67c930237b426389f0fbe890a05707e18
4
+ data.tar.gz: f2ab6eaf54d5c407ab891370ceaec1d1d25d659730e12c5dd2ad9b5fb3ac7ae8
5
5
  SHA512:
6
- metadata.gz: 346b3a090af9dee0399a7307d276e340a70955e46eab95ed191149716a46ca0c898b65de68396d82f9c3dbd73760abe326acc38ecf3eb549287ad79a7c60101a
7
- data.tar.gz: b3a4642a05c2e54077a98639fe548164da79c81b00f6c6039d310ca3905fdd4e8f6a630e11babf4a72f2be76fe28d5df913ba355469db9d624c72c1eefd8b545
6
+ metadata.gz: 8a258133393608311a4044c421905b90e511af529ba465ba59173482722e01c63d06958434b7ee2d038a955c26205825fbb2b994e23460503ac61545a2e330c2
7
+ data.tar.gz: 1a6ba5a8f9de60dab801d4c5eb7ad871d3a00e0fe9cc58b25fa751d25c6b2a154ca2eb2880c8dc566556aabe183a15737fccd64905e34a1087bb0b066414d9d2
@@ -110,9 +110,8 @@ module EffectiveProductsRingWizard
110
110
 
111
111
  def build_ring
112
112
  ring = rings.build(owner: owner)
113
- address = owner.try(:shipping_address) || owner.try(:billing_address)
114
113
 
115
- if address.present?
114
+ if (address = owner.try(:shipping_address) || owner.try(:billing_address)).present?
116
115
  ring.shipping_address = address
117
116
  end
118
117
 
@@ -109,8 +109,13 @@ module EffectiveProductsStampWizard
109
109
  end
110
110
 
111
111
  def build_stamp
112
- address = owner.try(:shipping_address) || owner.try(:billing_address)
113
- stamps.build(owner: owner, shipping_address: address)
112
+ stamp = stamps.build(owner: owner)
113
+
114
+ if (address = owner.try(:shipping_address) || owner.try(:billing_address)).present?
115
+ stamp.shipping_address = address
116
+ end
117
+
118
+ stamp
114
119
  end
115
120
 
116
121
  def assign_pricing
@@ -1,3 +1,3 @@
1
1
  module EffectiveProducts
2
- VERSION = '0.0.8'.freeze
2
+ VERSION = '0.0.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
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: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails