effective_datatables 3.4.2 → 3.4.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: c42d4ca024b2d7bdfbb7a97d0dc01df51782b053
4
- data.tar.gz: 84cc95b864fd243033ac4660ac64c0873078ab4c
3
+ metadata.gz: e26d4f2f431c00dae4a016d1506950fdd4eb6b99
4
+ data.tar.gz: 805355120d586fa89e364a4b531c2e504cc17254
5
5
  SHA512:
6
- metadata.gz: fcd76cd8208b354d1599f14097d1218f7c9aeabce967da5d68690cd2a45da5e3c77c72f62ecaee0be79a9cbcc85ce1edb0e91e94f2d61171bbc13c818fdb6686
7
- data.tar.gz: c4e121a38e829be62e02880451ea79d3dded5b10ee1b65f5e0757f5721b94d79a237776edc6b73e17f450db791cddf2bfde9a24c4b0c56942d8eeebcab020a0b
6
+ metadata.gz: 75e06924ff2bce062a1678d6d8b76791eea4d365eb5e62037d8c6935b4f7d6017e8e1ca85236f0efed209af47de5b9f7db46b9bab004e1ab5fad8f9c817c1d15
7
+ data.tar.gz: 1efddd00bb9ef6989dd7677a199055432dbc4f97ec8addd4a87d42fa3cd1fb5ccf557c30fec868f0a4f78b61a17d2b7d266088b2eaaa076981b6770990f19298
@@ -91,7 +91,7 @@ module Effective
91
91
  if datatables_ajax_request?
92
92
  load_filter_params!
93
93
  load_ajax_state!
94
- elsif cookie.present? && cookie[:params] == params.length
94
+ elsif cookie.present? && cookie[:params] == params.length && EffectiveDatatables.save_state
95
95
  load_cookie_state!
96
96
  else
97
97
  # Nothing to do for default state
@@ -28,6 +28,10 @@ EffectiveDatatables.setup do |config|
28
28
  # Default class used on the <table> tag
29
29
  config.html_class = 'table table-bordered table-striped'
30
30
 
31
+ # If a user has previously visited this page and is returning, use the cookie to restore last session
32
+ # Irregardless of this setting, effective_datatables still uses a cookie to function
33
+ config.save_state = true
34
+
31
35
  # When using the actions_column DSL method, apply the following behavior
32
36
  # Valid values for each action are:
33
37
  # true - display this action if authorized?(:show, Post)
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '3.4.2'.freeze
2
+ VERSION = '3.4.3'.freeze
3
3
  end
@@ -8,6 +8,7 @@ module EffectiveDatatables
8
8
 
9
9
  mattr_accessor :default_length
10
10
  mattr_accessor :html_class
11
+ mattr_accessor :save_state
11
12
 
12
13
  mattr_accessor :actions_column # A Hash
13
14
  mattr_accessor :debug
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.4.2
4
+ version: 3.4.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-03-21 00:00:00.000000000 Z
11
+ date: 2018-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails