recourse 7.7.0 → 7.7.1

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: a39f935e577b873d97305e1b599b01b7c36a7e8f7c07b584df0f2449a2a58042
4
- data.tar.gz: ccce6838f769dcd9b3bc8bdbb00143b17f1a593e39f58567f3054373335f0a6d
3
+ metadata.gz: 7701d1c2564537b038401ab7224c1adebed9e766a9c3c316090e7b931a8eea2e
4
+ data.tar.gz: 72c419b28ec5ec1e6ed9704b753b36663daee1dfbc91a9d84b96dce934548f23
5
5
  SHA512:
6
- metadata.gz: 16faf5ac22fbc37539dd84b991b58f7027abbcd26bdedb13ecbcd9d877c966844508d8106eb66e99223bbce9e5998fc81ed9df781e03b6f8864ad036abcc8e62
7
- data.tar.gz: 3155b9735871a0de16dd9e95ea9375bce9ad062d46827afc4549a30c67cf868bd97d2c252e1062ac798b65612c52d7cf4525d52f654b66b82ee1428641dac134
6
+ metadata.gz: aadd0f9de7e9f02148030d1eae72c31eef0e5a4b74108ccae7243366d749e1d251521ff91aa78db616313725cb9bd90cd1f83e7ddc18c4544b6ee62bbed90482
7
+ data.tar.gz: a00d680bd48d7c9fa32aaf17d4feee6327853b8c267f3497d8c2372d986fb646010278cb1ab1c7648512713383822c2c78a80f588760bee3a49035b037e46ef7
data/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 7.7.1 - 2026-09-20
11
+
12
+ * [FIX] The filters the gem offers itself are ones Ransack will answer
13
+
14
+ `filterable_columns` read the schema alone, so a model narrowing
15
+ `ransackable_attributes` was offered menus for the columns it had just refused — and
16
+ 7.7.0 turned those into a refusal on a page the host never wrote a filter for. A model
17
+ that narrows what it allows narrows what it is offered with it.
18
+
10
19
  ## 7.7.0 - 2026-09-20
11
20
 
12
21
  * [CHANGE] `filter_fields` is a list of predicates, and nothing else
@@ -19,9 +19,11 @@ module Recourse
19
19
  # Columns a filter may name at all. A menu narrowing the table by a column no
20
20
  # screen shows asks a reader to choose by something they cannot see, which is the
21
21
  # reason `recourse_searchable_columns` leaves the same columns out of the search
22
- # box: hidden from every screen means hidden here.
22
+ # box: hidden from every screen means hidden here. And one Ransack will not
23
+ # answer for is no filter either — a model that narrows what it allows narrows
24
+ # what it offers with it.
23
25
  def filterable_columns
24
- column_names - Recourse.hidden_columns(self)
26
+ (column_names & ransackable_attributes) - Recourse.hidden_columns(self)
25
27
  end
26
28
 
27
29
  # Every one of the three comes to the same shape, and `_in` is what lets a
@@ -1,4 +1,4 @@
1
1
  module Recourse
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '7.7.0'
3
+ VERSION = '7.7.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recourse
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.7.0
4
+ version: 7.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob