recourse 7.2.0 → 7.3.0
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 +17 -0
- data/app/controllers/recourse/base_controller.rb +1 -1
- data/lib/recourse/helpers/cards.rb +6 -1
- data/lib/recourse/helpers/formats.rb +11 -1
- data/lib/recourse/helpers/values.rb +1 -1
- 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: 9f6b6c7f06985a9e98ef9544e3f7494dca418d4a962fe9c1690d20e05b057104
|
|
4
|
+
data.tar.gz: 9ea935c4fb5c7b1ad8d37f4d0001dc3c0d59e0f5b50b8d383bfa49c9441db7d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a146580b87daa86917b16a3fab8c2029f0d72d2ccf40a877550537b1c058e87caa294f6d66996909a0398585191e3d70e70a835e4dd606eca08d14afea1c5803
|
|
7
|
+
data.tar.gz: 37a1dcaa862e424001eddfccf0018951bb62ccf6762c7c2d19995946f1fb72fca99ce7047c82f586b4154a9af080aa167e5a38edb9b4641902011b6dd12d1fa2
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## 7.3.0 - 2026-09-20
|
|
11
|
+
|
|
12
|
+
* [CHANGE] A boolean reads as the word a reader answers with
|
|
13
|
+
|
|
14
|
+
A cell and a value read `true` and `false`, which is what the database keeps and not
|
|
15
|
+
what anybody asked. Both now read `Yes` and `No` — the two the filter menu beside the
|
|
16
|
+
column already offered — and a nullable column nobody answered reads as the dash every
|
|
17
|
+
other empty value reads as, rather than as a no.
|
|
18
|
+
|
|
19
|
+
## 7.2.1 - 2026-09-20
|
|
20
|
+
|
|
21
|
+
* [FIX] A refused change keeps the card it was made in
|
|
22
|
+
|
|
23
|
+
The card is drawn around a record's own pages, worked out from the action: `show` and
|
|
24
|
+
`edit`. A write a validation turns down draws `edit` again under the name `update`, so
|
|
25
|
+
the tabs went with it and the reader was left with a form and no way back.
|
|
26
|
+
|
|
10
27
|
## 7.2.0 - 2026-09-20
|
|
11
28
|
|
|
12
29
|
* [CHANGE] A row a model will not give up says so, rather than raising
|
|
@@ -71,7 +71,7 @@ module Recourse
|
|
|
71
71
|
def destroy
|
|
72
72
|
return wrote t('recourse.deleted', model: human_name) if destroy_resource @recourse
|
|
73
73
|
|
|
74
|
-
flash.alert = t
|
|
74
|
+
flash.alert = t 'recourse.deleted_error', model: human_name
|
|
75
75
|
redirect_back fallback_location: url_for(action: :index), status: :see_other
|
|
76
76
|
end
|
|
77
77
|
|
|
@@ -3,13 +3,18 @@ module Recourse
|
|
|
3
3
|
# The tabs on the card a record's pages share: a look, a change, and each
|
|
4
4
|
# nested index under the record — counted where the record keeps a count.
|
|
5
5
|
module Cards
|
|
6
|
+
# The pages a record's card is drawn around. `update` is the change page too: a
|
|
7
|
+
# write a validation turns down draws the form again, and the tabs a reader came
|
|
8
|
+
# in by are still the record's.
|
|
9
|
+
CARDED = %w[show edit update].freeze
|
|
10
|
+
|
|
6
11
|
private
|
|
7
12
|
|
|
8
13
|
# The record whose card this page is drawn in: the parent, on a page nested under
|
|
9
14
|
# one, and the record itself where the page is its look or its change. An index of
|
|
10
15
|
# its own, and a form for a record that is not there yet, stand outside a card.
|
|
11
16
|
def card_record
|
|
12
|
-
resource_parent || (resource_record if controller.action_name.in?
|
|
17
|
+
resource_parent || (resource_record if controller.action_name.in? CARDED)
|
|
13
18
|
end
|
|
14
19
|
|
|
15
20
|
# The pages of the record the card is about, as `[label, path, current]` — a
|
|
@@ -18,12 +18,13 @@ module Recourse
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
# One value, formatted by the kind its column holds — the one ladder a table
|
|
21
|
-
# cell and a show page's value both come down, so a boolean is the same
|
|
21
|
+
# cell and a show page's value both come down, so a boolean is the same word
|
|
22
22
|
# and an enum the same badge on either. A block, where the caller has one,
|
|
23
23
|
# marks the search terms inside whichever arm ends up as words.
|
|
24
24
|
def formatted_attribute(column, value, &)
|
|
25
25
|
kind = attribute_kind column
|
|
26
26
|
return listed Array(value) if kind == :list
|
|
27
|
+
return affirmed value if kind == :boolean
|
|
27
28
|
return formatted_number kind, column, value if numeric_kind? kind
|
|
28
29
|
|
|
29
30
|
formatted_text kind, value, &
|
|
@@ -51,6 +52,15 @@ module Recourse
|
|
|
51
52
|
end
|
|
52
53
|
end
|
|
53
54
|
|
|
55
|
+
# The word a reader answers with, which is the word the filter beside the column
|
|
56
|
+
# already offers. A column that was never answered holds neither, so it reads as
|
|
57
|
+
# the dash every other empty value does rather than as a no.
|
|
58
|
+
def affirmed(value)
|
|
59
|
+
return if value.nil?
|
|
60
|
+
|
|
61
|
+
t value ? 'recourse.affirmative' : 'recourse.negative'
|
|
62
|
+
end
|
|
63
|
+
|
|
54
64
|
# One whole web address is a value to follow rather than to read, and anything
|
|
55
65
|
# else is words — which the caller may have marking of its own for.
|
|
56
66
|
def linked_or_marked(value, &)
|
|
@@ -18,7 +18,7 @@ module Recourse
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
# What the record says for one column, or a dash where it says nothing. A
|
|
21
|
-
# boolean says something either way, and
|
|
21
|
+
# boolean says something either way, and a word says it, so only a value that
|
|
22
22
|
# formats to nothing at all reads as nothing.
|
|
23
23
|
def resource_value(column)
|
|
24
24
|
value = formatted_value column
|
data/lib/recourse/version.rb
CHANGED