effective_datatables 4.11.1 → 4.13.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: 026730ba20562ddac0f28a5bde43b522207a59c4c9ae673545405b0c4d005a55
4
- data.tar.gz: 72e5ef907b2c0b5fd94274a14f9025d34767abe5ad4aa56396d7888b7eb28b91
3
+ metadata.gz: 026700452dbbf432629b18e46f8517979b9fe2784f021f36569b649b578f2811
4
+ data.tar.gz: 955bdbd430efc062dd92d9b787f5155209de879047b8ed858d59c4385137c1eb
5
5
  SHA512:
6
- metadata.gz: 7635a47dd2047b7dec807a11d881f6babc37603135c194a8303b1ae8307ec8628279b348543e806339548dd7e5f296fe784a3f82da8c2fd8ad0224b1e6f1d242
7
- data.tar.gz: 5352f10cb81378464d412200784e255c197837fe67451182fe6b2e6d570673c627c3b2d0819e6831c3d7eb51290411339d8cd64f2cef9b66069407c375686847
6
+ metadata.gz: 28e8de18bec21967229456d63b001e4564d43aecdb69ae854da39ae87bbea409d3b804c91b00c6ceebd7f64c5409a47d41346ecf0e97538f40d0742842590947
7
+ data.tar.gz: ba10b13bd4fbc714dfc5ffacd514b8476fc3042e60b59f629bff465d9b1b9de86d335917f61f01c8092b1dc43c06764e4b6f4ff48346dd19d7e52c81d15c9db1
@@ -208,3 +208,5 @@ $(document).on 'page:change', -> initializeDataTables()
208
208
  $(document).on 'turbolinks:load', -> initializeDataTables()
209
209
  $(document).on 'turbolinks:render', -> initializeDataTables()
210
210
  $(document).on 'turbolinks:before-cache', -> destroyDataTables()
211
+ $(document).on 'turbo:load', -> initializeDataTables()
212
+ $(document).on 'turbo:before-cache', -> destroyDataTables()
@@ -18,7 +18,7 @@ module Effective
18
18
  @view = datatable.view
19
19
  end
20
20
 
21
- def method_missing(method, *args, &block)
21
+ def method_missing(method, *args, **kwargs, &block)
22
22
  # Catch a common error
23
23
  if [:bulk_actions, :charts, :collection, :filters].include?(method) && in_datatables_do_block
24
24
  raise "#{method} block must be declared outside the datatable do ... end block"
@@ -26,15 +26,15 @@ module Effective
26
26
 
27
27
  if datatable.respond_to?(method)
28
28
  if block_given?
29
- datatable.send(method, *args) { yield }
29
+ datatable.send(method, *args, **kwargs) { yield }
30
30
  else
31
- datatable.send(method, *args)
31
+ datatable.send(method, *args, **kwargs)
32
32
  end
33
33
  elsif view.respond_to?(method)
34
34
  if block_given?
35
- view.send(method, *args) { yield }
35
+ view.send(method, *args, **kwargs) { yield }
36
36
  else
37
- view.send(method, *args)
37
+ view.send(method, *args, **kwargs)
38
38
  end
39
39
  else
40
40
  super
@@ -93,6 +93,7 @@ module Effective
93
93
  collection.select! do |row|
94
94
  obj = row[index]
95
95
  value = obj_to_value(row[index], column, row)
96
+ next if value.blank?
96
97
 
97
98
  case column[:as]
98
99
  when :boolean
@@ -36,7 +36,7 @@ module Effective
36
36
 
37
37
  opts[:class] = [opts[:class], 'dropdown-item'].compact.join(' ')
38
38
 
39
- link_to(title, url, opts)
39
+ link_to(title, url, **opts)
40
40
  end
41
41
 
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.11.1'.freeze
2
+ VERSION = '4.13.0'.freeze
3
3
  end
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.11.1
4
+ version: 4.13.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: 2022-05-19 00:00:00.000000000 Z
11
+ date: 2022-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails