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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/recourse/searchable/filters.rb +4 -2
- data/lib/recourse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7701d1c2564537b038401ab7224c1adebed9e766a9c3c316090e7b931a8eea2e
|
|
4
|
+
data.tar.gz: 72c419b28ec5ec1e6ed9704b753b36663daee1dfbc91a9d84b96dce934548f23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/recourse/version.rb
CHANGED