effective_datatables 4.20.6 → 4.21.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: 6f7c205135a1636a8e73e9b18f9a1ae773a742dedaf1f8c9ded5841437b76de1
4
- data.tar.gz: 4833cbbf89c6c11c58e3493df4c6ce9cd6832eab94fe57c82a9cd4b7bb1e063e
3
+ metadata.gz: 210cb8d5b9233594d9e2b696bdd9485671dd575e8a6fb9163ab8114e03279544
4
+ data.tar.gz: 1faf57cff7dcce3231ed403479cdb4c1311387bf065c2b97c9a8838421e42cfd
5
5
  SHA512:
6
- metadata.gz: 3369c5d02656e568ad03d80f063c862deb76fbdbe7ee59f3825b7648be9c65903c63f7185e0318aa81265fc723e4b14d704b838c1e7ec37b0692ff0daa4c258a
7
- data.tar.gz: f4bedb87ab51be6fcaf49392e65ccabfabf3c1b15df3d88338015ea2aa40704167c03caa45cee6c6bf162098351734373b946c21f5f72e37e9105b0f34a14981
6
+ metadata.gz: 95067dab22065c409e3298bff330334aeacf7753bb9ccfe2a831ade07c3a29158d3818fd74dc1a215e5aa408c01b41dcecaef390f3923b3572dc38866247e5b1
7
+ data.tar.gz: 31540ecf1ab1b1bb6d2359c51c85e110a9c27ccc8e6e9a9a92f35011be3a835a101427769fb862a77a3a23efebf9aacaa9370a75d1d50563c59b01d49c668ace
@@ -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 = [] # 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
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.20.6'.freeze
2
+ VERSION = '4.21.1'.freeze
3
3
  end
@@ -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
 
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.20.6
4
+ version: 4.21.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-11-28 00:00:00.000000000 Z
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.4.10
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