effective_datatables 4.17.0 → 4.17.1
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: 2be4e45193ceaf2f5fc2f8543cde183156ec0210d844a9603977f7b456197bf4
|
4
|
+
data.tar.gz: c7b437a89b3439f79b1d596936efb1be6401d8c12a4ffb844aecf2150d59772d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8601ecaaea61c41cdb6375e0f6b6521593326596c620142a7ea5752030dc3b9957453c1c1c3b82d6de54e21d8811fb6bad64cebef629cc6f6d064d86d8aec29
|
7
|
+
data.tar.gz: 0f55d6478da0bb096d493c898dc34a606b85f7b8b4009ff35bc5a58e5bc0a34c7828fe67b81fe4b4daa69f5b9f672d85e1d14787211bc6f4cf485e921d160884
|
@@ -69,13 +69,19 @@ module EffectiveDatatablesPrivateHelper
|
|
69
69
|
|
70
70
|
case opts[:as]
|
71
71
|
when :belongs_to
|
72
|
-
opts[:resource].
|
72
|
+
foreign_key = opts[:resource].initialized_name.try(:foreign_key).to_s.downcase
|
73
|
+
klass_name = opts[:resource].initialized_name.try(:class_name).to_s.downcase
|
74
|
+
|
75
|
+
if foreign_key.starts_with?(klass_name)
|
76
|
+
opts[:resource].human_name
|
77
|
+
else
|
78
|
+
datatable.collection_class.human_attribute_name(name)
|
79
|
+
end
|
73
80
|
when :has_many
|
74
81
|
opts[:resource].human_plural_name
|
75
82
|
else
|
76
83
|
datatable.collection_class.human_attribute_name(name)
|
77
84
|
end
|
78
|
-
|
79
85
|
end
|
80
86
|
|
81
87
|
def datatable_search_tag(datatable, name, opts)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_datatables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.17.
|
4
|
+
version: 4.17.1
|
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-03
|
11
|
+
date: 2023-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|