katalyst-tables 3.11.2 → 3.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9729837e84361c855acdd0d23b3c516cea8f23e0d35efdd6508c9a18b9b63119
4
- data.tar.gz: a0a53bc4ae518f42c208489ddfdc0afb8ef7449db1723fcac9a40ccf2efadaae
3
+ metadata.gz: f1a656d6c4afdbaaa9775b017ece93c5a1ed47f1fa23b6a629ee902ea6862de8
4
+ data.tar.gz: 6ae825a285b001c1a9fdb88f4b5611a1cc7a87273d13819bcf863f3c9c3a4ed6
5
5
  SHA512:
6
- metadata.gz: bd459c5d5fa680739a8076f4fb9a7ac23fa99a7ccf3acb4a0be27a4510daa08008707f24034b18ca31aaf7883ee5439be0d690ab920bc517e1400193f8855d50
7
- data.tar.gz: 06344beea9462b8eb4772baf662755f718d0a66c55407c8e52e3b70a6fe1f2a2a12f900a9fe3cc870a262aa9fc86ca5ddc9d15640f43826dc1ea3d08dc583b9a
6
+ metadata.gz: 24ff7144511a36aac499f10f035eea0fd5c734c0f98e21caf7094e48902796d24ad5f8e30cc14f0f0c8e3c3a68ae7336f732fb974a038b541872a9b4faa8e8cc
7
+ data.tar.gz: c8e1be4b57246e7bf3cdd988aeb812b34e95c518c8176f4931040cf53ceb1351f23f8bdfd7b89239bc5a2b139447336e22fa9d7d88055a206ff92f15177160ce
@@ -5,6 +5,11 @@ module Katalyst
5
5
  module Collection
6
6
  class Config
7
7
  attr_accessor :paginate, :sorting
8
+
9
+ def initialize(parent = nil)
10
+ @paginate = parent&.paginate&.dup
11
+ @sorting = parent&.sorting&.dup
12
+ end
8
13
  end
9
14
 
10
15
  module Core # :nodoc:
@@ -18,8 +23,9 @@ module Katalyst
18
23
  include Reducers
19
24
 
20
25
  class_methods do
21
- def config
22
- @config ||= Config.new
26
+ def inherited(subclass)
27
+ subclass.config = Config.new(config)
28
+ super
23
29
  end
24
30
 
25
31
  def permitted_params
@@ -53,6 +59,7 @@ module Katalyst
53
59
  end
54
60
 
55
61
  included do
62
+ class_attribute :config, instance_accessor: false, default: Config.new
56
63
  attr_accessor :items, :unscoped_items
57
64
 
58
65
  delegate :each, :count, :empty?, to: :items, allow_nil: true
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "active_support/configurable"
4
-
5
3
  module Katalyst
6
4
  module Tables
7
5
  class Config
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.2
4
+ version: 3.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  requirements: []
185
- rubygems_version: 3.6.9
185
+ rubygems_version: 4.0.3
186
186
  specification_version: 4
187
187
  summary: HTML table generator for Rails views
188
188
  test_files: []