effective_datatables 4.20.5 → 4.21.0
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: 59425c0820bca218251c276ec9c7ea515e37ffefaa43b438b6d082e3fb9e0219
|
4
|
+
data.tar.gz: 32c49b0c8806c7905f2474999d6debf93be35de1bc43aa11fa9cd415ddebe474
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca83f8036759b78eeaab77dacbfea62723438e4c7678bcf7a3e2706f0512e587b83a3c923d97572d7b8eb61577aaa594af32e2890989ad0bebccd489637576d4
|
7
|
+
data.tar.gz: 1deef20248ebefa1ee6351d39754f3cb94e4d9f5417ca9466b10fafa0557b810db10b05e11c285fe0dc699f8040425ad670e7c98ffef5f4e17e9bca77efa7826
|
@@ -28,8 +28,8 @@ module Effective
|
|
28
28
|
retval = attributes.except(*resources.keys)
|
29
29
|
|
30
30
|
resources.each do |k, resource|
|
31
|
-
retval["#{k}_id".to_sym] = resource.id
|
32
31
|
retval["#{k}_type".to_sym] = resource.class.name
|
32
|
+
retval["#{k}_id".to_sym] = resource.id
|
33
33
|
end
|
34
34
|
|
35
35
|
retval
|
@@ -15,6 +15,12 @@ module Effective
|
|
15
15
|
# Assign total records
|
16
16
|
@total_records = (active_record_collection? ? column_tool.size(col) : value_tool.size(col))
|
17
17
|
|
18
|
+
# Apply jit_preloader if present
|
19
|
+
if active_record_collection? && defined?(JitPreloader) && EffectiveDatatables.use_jit_preloader
|
20
|
+
col.includes_values.reject! { true } # Removes any previously defined .includes()
|
21
|
+
col = col.jit_preload
|
22
|
+
end
|
23
|
+
|
18
24
|
# Apply scope
|
19
25
|
col = column_tool.scope(col) if @_collection_apply_scope
|
20
26
|
|
@@ -46,4 +46,8 @@ EffectiveDatatables.setup do |config|
|
|
46
46
|
|
47
47
|
# Enable the Download button which serves a CSV of your collection
|
48
48
|
config.download = false
|
49
|
+
|
50
|
+
# Call jit_preloader on ActiveRecord collections automatically. Must have jit_preloader gem installed.
|
51
|
+
# https://github.com/clio/jit_preloader
|
52
|
+
config.use_jit_preloader = false
|
49
53
|
end
|
data/lib/effective_datatables.rb
CHANGED
@@ -23,6 +23,8 @@ module EffectiveDatatables
|
|
23
23
|
mattr_accessor :debug
|
24
24
|
mattr_accessor :download
|
25
25
|
|
26
|
+
mattr_accessor :use_jit_preloader
|
27
|
+
|
26
28
|
alias_method :max_cookie_size, :cookie_max_size
|
27
29
|
alias_method :max_cookie_size=, :cookie_max_size=
|
28
30
|
|
@@ -80,12 +82,13 @@ module EffectiveDatatables
|
|
80
82
|
|
81
83
|
raise 'invalid decoded inline payload' unless attributes.kind_of?(Hash)
|
82
84
|
|
83
|
-
attributes
|
85
|
+
attributes.symbolize_keys
|
84
86
|
end
|
85
87
|
|
86
88
|
def self.message_encrypter
|
87
|
-
key = (Rails.application.
|
88
|
-
key ||= (Rails.application.secret_key_base.presence rescue nil)
|
89
|
+
key = (Rails.application.secret_key_base.presence rescue nil)
|
90
|
+
key ||= (Rails.application.try(:credentials).try(:secret_key_base).presence rescue nil)
|
91
|
+
key ||= (Rails.application.try(:secrets).try(:secret_key_base).presence rescue nil)
|
89
92
|
key ||= 10.times.map { "".hash.to_s }.join
|
90
93
|
|
91
94
|
ActiveSupport::MessageEncryptor.new(key.to_s.first(32))
|
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.
|
4
|
+
version: 4.21.0
|
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
|
+
date: 2023-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
|
-
rubygems_version: 3.
|
199
|
+
rubygems_version: 3.3.7
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Uniquely powerful server-side searching, sorting and filtering of any ActiveRecord
|