effective_orders 5.2.4 → 5.2.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc1c2f6fea7135b9b7578bef447c14f3485fd68cef06a2c441c17c08fcce5628
|
4
|
+
data.tar.gz: eedc4248429fafb164669fb64a03b0119ae2bbd806847a8022670c0da947ffc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b7955c3e945f81015f7f3958cd70ccb80dc55fc935c7e29043a4f2b2174c700c42f9bf32dc322b3743cc2ec5d1b1c38682a24dfcf6322cd631315b63d99b049
|
7
|
+
data.tar.gz: 06e6e17294699a973be1d3b34a6cf0a5d97623e9e9523e9a618113f783bd7ffbefce7d2dd8ec113139feb35d69d120130ca6adb8c917c18f598439adf83012ae
|
@@ -93,9 +93,10 @@ class Admin::EffectiveOrdersDatatable < Effective::Datatable
|
|
93
93
|
end
|
94
94
|
|
95
95
|
if attributes[:user_id].present?
|
96
|
-
user_klass = (attributes[:user_type].
|
97
|
-
|
96
|
+
user_klass = (attributes[:user_type].constantize if attributes[:user_type].present?)
|
97
|
+
user_klass ||= current_user.class
|
98
98
|
|
99
|
+
user = user_klass.find(attributes[:user_id])
|
99
100
|
scope = scope.where(user: user)
|
100
101
|
end
|
101
102
|
|
@@ -62,7 +62,9 @@ class EffectiveOrdersDatatable < Effective::Datatable
|
|
62
62
|
end
|
63
63
|
|
64
64
|
collection do
|
65
|
-
user_klass = (attributes[:user_type].
|
65
|
+
user_klass = (attributes[:user_type].constantize if attributes[:user_type].present?)
|
66
|
+
user_klass ||= current_user.class
|
67
|
+
|
66
68
|
user = user_klass.find(attributes[:user_id])
|
67
69
|
|
68
70
|
scope = Effective::Order.all.deep.where(user: user)
|