effective_datatables 3.5.2 → 3.5.3

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
  SHA1:
3
- metadata.gz: 9cd68beee734d563dfcd4ee9535e01aee6d121b3
4
- data.tar.gz: 75255066db9a98a9da9d18534c402202670f84c1
3
+ metadata.gz: 3813562b9c177a651b008fd0781a94515ace3f66
4
+ data.tar.gz: 460a5d7a7c517f5bb866961c17a24253eeaa8833
5
5
  SHA512:
6
- metadata.gz: ae954fd101983c833afc51e9ce27db3f92b904390ff26312b9bb4a791ea470bb49966f0a480c5111993ffea3999d897bf9f20b1fca67724c69ee5cc80e844339
7
- data.tar.gz: 77de12778528a1d10fc9658d17e04cdacb74b6e16901df219f922a9522d579025c30fac329374272565499176131df3834e4832e71cd9e9b0fd3606641ef98a5
6
+ metadata.gz: 180762a057ac6273feae00328a5567e8d440d6df57e366bc39c3608de76718d190b54c9cdafdfbd1f31f164a4b7d03c9dca6d42a3ae448d48f6c0de8bbadb83b
7
+ data.tar.gz: 292532e3113a6c099995ec30b0f7aa920e84e7833208c3eaaed9e524f3cc6d6314fde55bae23d402b2f36a6a0b577c20360fa2b1ea29db6657ecc8f63bdac738
@@ -1,8 +1,6 @@
1
1
  module Effective
2
2
  module EffectiveDatatable
3
3
  module Cookie
4
- MAX_COOKIE_SIZE = 2000 # String size. Real byte size is about 1.5 times bigger.
5
-
6
4
  def cookie
7
5
  @cookie
8
6
  end
@@ -45,7 +43,7 @@ module Effective
45
43
  @dt_cookie ||= []
46
44
  @dt_cookie << [cookie_key, cookie_payload]
47
45
 
48
- while @dt_cookie.to_s.size > MAX_COOKIE_SIZE
46
+ while @dt_cookie.to_s.size > EffectiveDatatables.max_cookie_size.to_i
49
47
  @dt_cookie.shift((@dt_cookie.length / 3) + 1)
50
48
  end
51
49
 
@@ -49,4 +49,7 @@ EffectiveDatatables.setup do |config|
49
49
  # Log search/sort information to the console
50
50
  config.debug = true
51
51
 
52
+ # String size. Final byte size is about 1.5 times bigger, after rails signs it
53
+ config.max_cookie_size = 2000
54
+
52
55
  end
@@ -9,6 +9,7 @@ module EffectiveDatatables
9
9
  mattr_accessor :default_length
10
10
  mattr_accessor :html_class
11
11
  mattr_accessor :save_state
12
+ mattr_accessor :max_cookie_size
12
13
 
13
14
  mattr_accessor :actions_column # A Hash
14
15
  mattr_accessor :debug
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '3.5.2'.freeze
2
+ VERSION = '3.5.3'.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: 3.5.2
4
+ version: 3.5.3
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: 2018-10-29 00:00:00.000000000 Z
11
+ date: 2018-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails