katalyst-tables 2.2.6 → 2.2.8

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: 3b574c64df2689986e01f6b7a51709f80806790abf22a6b1134ab0e82ee0d058
4
- data.tar.gz: 6127e32f529378ee36b923edbe0db1021b16c233edca12255150810b2cd69e92
3
+ metadata.gz: 912bbde0db12fa0f5a6c6eda7958273f2d0b3efe4476d407ee19b6e6abb3abd1
4
+ data.tar.gz: a065eaa897a541fdf08e257d17147206b38e1af2f92cc1ce508f6be19de60acb
5
5
  SHA512:
6
- metadata.gz: f76db646ae34a587dcb466841729dcc404f4edffeabf9476b381b651f4757a198e088e9d643f9eb94acd19429438b73eb09565cd452af7ca4009fbf9577f6106
7
- data.tar.gz: 54b9ad471e692a069ed04eebe2db54a52cc35eb9e54c3842e35e7ae58b70930c5a6361e0c22ee47001b7ecc118ed4c29ef11503a69c0f97b4649dbaef3c70b9c
6
+ metadata.gz: 7d3ed117d5cf77f50674fe097d2979fa19253965e2ac14104637eb503c38c80f087f3c05eb7f87df25336b61a380ae541fa35e037bf9923cf38bb393cd38d7a9
7
+ data.tar.gz: 96a3adcfb05be7dd131e68f5851fe960d92d2d57ed07bf0d2bbf9f571ae6a26a47f213ee2e2567baa2f478f267d53a61dcf29e4c1d331057ccd9bbcf7af99e05
@@ -35,9 +35,7 @@ module Katalyst
35
35
 
36
36
  def current_path
37
37
  params = collection.to_params
38
- query_string = params.empty? ? "" : "?#{Rack::Utils.build_nested_query(params)}"
39
-
40
- "#{query_string}"
38
+ params.empty? ? "" : "?#{Rack::Utils.build_nested_query(params)}"
41
39
  end
42
40
 
43
41
  def default_header_options
@@ -15,7 +15,14 @@ module Katalyst
15
15
 
16
16
  class_methods do
17
17
  def permitted_params
18
- attribute_names
18
+ _default_attributes.to_h.each_with_object([]) do |(k, v), h|
19
+ h << case v
20
+ when Array
21
+ { k => [] }
22
+ else
23
+ k
24
+ end
25
+ end
19
26
  end
20
27
  end
21
28
 
@@ -37,7 +44,7 @@ module Katalyst
37
44
  end
38
45
 
39
46
  def filtered?
40
- !self.class.new.filters.eql?(filters)
47
+ self.class.new.filters != filters
41
48
  end
42
49
 
43
50
  def filters
@@ -16,6 +16,11 @@ module Katalyst
16
16
 
17
17
  class_methods do
18
18
  delegate :use, :insert, to: :reducers
19
+
20
+ def inherited(subclass)
21
+ super
22
+ subclass.reducers = reducers.dup
23
+ end
19
24
  end
20
25
 
21
26
  class Stack # :nodoc:
@@ -23,6 +28,10 @@ module Katalyst
23
28
  @stack = []
24
29
  end
25
30
 
31
+ def initialize_dup(other)
32
+ @stack = other.instance_variable_get(:@stack).dup
33
+ end
34
+
26
35
  def use(klass)
27
36
  @stack << Reducer.new(klass) unless index(klass)
28
37
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Katalyst
4
4
  module Tables
5
- VERSION = "2.2.6"
5
+ VERSION = "2.2.8"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.6
4
+ version: 2.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-31 00:00:00.000000000 Z
11
+ date: 2023-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-attributes-utils