effective_orders 5.2.2 → 5.2.6
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: 36c18b8ae581c3810b506b1109b875ca85348eb696a4349d03393d94b1a4dcde
|
4
|
+
data.tar.gz: 38094b154acd13da226a1f6d89ce03424c0789ab060c5ed95ec3231e197c1546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f85cf4d158028ced1bdc215af18dde0977769d530f1161db1f8bf8cd69ce8d8015774cd938af53a69c4b1163fb67308def2bf08299822818b8572d99c780321a
|
7
|
+
data.tar.gz: cc7fb7ababed9e55f759e31091eb21f9db3ec11a403f8f9d2b755f14aa84cf449801302aadded96951143ad503541fee312a20b035a4ac5d367a46f419c86c25
|
@@ -93,7 +93,10 @@ class Admin::EffectiveOrdersDatatable < Effective::Datatable
|
|
93
93
|
end
|
94
94
|
|
95
95
|
if attributes[:user_id].present?
|
96
|
-
|
96
|
+
user_klass = (attributes[:user_type].constantize if attributes[:user_type].present?)
|
97
|
+
user_klass ||= current_user.class
|
98
|
+
|
99
|
+
user = user_klass.find(attributes[:user_id])
|
97
100
|
scope = scope.where(user: user)
|
98
101
|
end
|
99
102
|
|
@@ -62,7 +62,10 @@ class EffectiveOrdersDatatable < Effective::Datatable
|
|
62
62
|
end
|
63
63
|
|
64
64
|
collection do
|
65
|
-
|
65
|
+
user_klass = (attributes[:user_type].constantize if attributes[:user_type].present?)
|
66
|
+
user_klass ||= current_user.class
|
67
|
+
|
68
|
+
user = user_klass.find(attributes[:user_id])
|
66
69
|
|
67
70
|
scope = Effective::Order.all.deep.where(user: user)
|
68
71
|
|
data/lib/effective_orders.rb
CHANGED
@@ -116,7 +116,7 @@ module EffectiveOrders
|
|
116
116
|
|
117
117
|
# The Effective::Order.payment_provider value must be in this collection
|
118
118
|
def self.payment_providers
|
119
|
-
|
119
|
+
[
|
120
120
|
('cheque' if cheque?),
|
121
121
|
('credit card' if mark_as_paid?),
|
122
122
|
('free' if free?),
|
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: 5.2.
|
4
|
+
version: 5.2.6
|
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: 2021-
|
11
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|