effective_resources 2.17.0 → 2.17.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46c712cd75d13df75d324ea9da1dc8e4f10876febd007fcafa0bc588b7d2b0ed
|
4
|
+
data.tar.gz: 10f366d71be5c8a5bb57b52f2986f1ef61b06301602de65ddd8a89bc7bf14303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ba14951fc68a9e7ed1fb91ebd2f7a734f7f4d954a9e68a27eca28834572efadc538b283610b204bb08cc09fe6f5d59fb6abe3d804d41f6ea9999d7e00b1b14b
|
7
|
+
data.tar.gz: e1929d73f39146fae3ce336c0289f8f4f0660dd3467126bfacdd2ceec94a8d7245c2ac2672b2c5d441498f70d74501158ad2043518f91e0f47d1dce472a9371a
|
@@ -74,15 +74,23 @@ module ActsAsPurchasableWizard
|
|
74
74
|
# From Billing Step
|
75
75
|
order.billing_address = owner.billing_address if owner.try(:billing_address).present?
|
76
76
|
|
77
|
-
# This will update all order items to match the prices from their
|
77
|
+
# This will update all order items to match the prices from their purchasable
|
78
78
|
order.try(:update_purchasable_attributes)
|
79
79
|
|
80
|
+
# Hook to extend for coupon fees
|
81
|
+
order = before_submit_order_save(order)
|
82
|
+
raise('before_submit_order_save must return an Effective::Order') unless order.kind_of?(Effective::Order)
|
83
|
+
|
80
84
|
# Important to add/remove anything
|
81
85
|
order.save!
|
82
86
|
|
83
87
|
order
|
84
88
|
end
|
85
89
|
|
90
|
+
def before_submit_order_save(order)
|
91
|
+
order
|
92
|
+
end
|
93
|
+
|
86
94
|
# Should be indempotent.
|
87
95
|
def build_submit_fees_and_order
|
88
96
|
return false if was_submitted?
|
@@ -83,13 +83,14 @@ module Effective
|
|
83
83
|
scope.datatables_scope
|
84
84
|
elsif scope.respond_to?(:datatables_filter)
|
85
85
|
scope.datatables_filter
|
86
|
+
elsif scope.respond_to?(:shallow)
|
87
|
+
scope.shallow
|
86
88
|
elsif scope.respond_to?(:sorted)
|
87
89
|
scope.sorted
|
88
90
|
else
|
89
91
|
scope
|
90
92
|
end
|
91
93
|
|
92
|
-
scope = scope.deep if scope.respond_to?(:deep)
|
93
94
|
scope = scope.unarchived if scope.respond_to?(:unarchived)
|
94
95
|
|
95
96
|
# Now that we have the scope figured out let's pull the limit number of records into an Array
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.17.
|
4
|
+
version: 2.17.2
|
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: 2023-11-
|
11
|
+
date: 2023-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|