recourse 7.1.0 → 7.2.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 +8 -0
- data/app/controllers/concerns/recourse/attachment_writing.rb +1 -1
- data/app/controllers/concerns/recourse/reference_resolution.rb +1 -1
- data/app/controllers/recourse/base_controller.rb +7 -4
- data/config/locales/recourse.en.yml +1 -0
- 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: 95ef379a34df3d662d855df04690b3627584af8e5340d3bc7f9fd451569d6828
|
|
4
|
+
data.tar.gz: 6429eefa62d743af7e1071cac2bed85618fc36dba623551d14d01f62129b2ded
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 487d50ea3bf02897f91807512d4624dd768b41483ccd5b4a4da74f4d3aa8e460c3491e3abe1739d13ca55480a985b9c93485112352c28bae5729c0969316f92b
|
|
7
|
+
data.tar.gz: 29540aff5c10c30fca2a7c79ac0fe6ad4f572d505be2a085dfc7f3675539941c0a67358a328a431a0d39974410665a5e7891c3511e88b93cb26926ba916d707e
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## 7.2.0 - 2026-09-20
|
|
11
|
+
|
|
12
|
+
* [CHANGE] A row a model will not give up says so, rather than raising
|
|
13
|
+
|
|
14
|
+
`destroy` was `destroy!`, so a `before_destroy` that threw `:abort` answered a reader
|
|
15
|
+
with a 500. The page keeps the row and says `Specialty could not be deleted.`, the way
|
|
16
|
+
an update that a validation turned down says what it says.
|
|
17
|
+
|
|
10
18
|
## 7.1.0 - 2026-09-20
|
|
11
19
|
|
|
12
20
|
* [CHANGE] The card draws the button that deletes what the page is about
|
|
@@ -24,7 +24,7 @@ module Recourse
|
|
|
24
24
|
|
|
25
25
|
# And the record gone. `destroy!`, so a callback that stops one says so rather than
|
|
26
26
|
# leaving the page claiming it worked.
|
|
27
|
-
def destroy_resource(record) = record.destroy
|
|
27
|
+
def destroy_resource(record) = record.destroy
|
|
28
28
|
|
|
29
29
|
# A foreign key whose label is typed arrives as that label, so it is looked up
|
|
30
30
|
# here. Nothing found leaves the key nil, and `belongs_to` reports it missing.
|
|
@@ -65,11 +65,14 @@ module Recourse
|
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
-
# Deletes the record and shows the index without it.
|
|
69
|
-
#
|
|
68
|
+
# Deletes the record and shows the index without it. A callback that stops one is
|
|
69
|
+
# answered where the record still is, rather than left to raise or to let the page
|
|
70
|
+
# claim it worked: a row a model refuses to give up is a page's business, not a 500.
|
|
70
71
|
def destroy
|
|
71
|
-
destroy_resource @recourse
|
|
72
|
-
|
|
72
|
+
return wrote t('recourse.deleted', model: human_name) if destroy_resource @recourse
|
|
73
|
+
|
|
74
|
+
flash.alert = t('recourse.deleted_error', model: human_name)
|
|
75
|
+
redirect_back fallback_location: url_for(action: :index), status: :see_other
|
|
73
76
|
end
|
|
74
77
|
|
|
75
78
|
private
|
data/lib/recourse/version.rb
CHANGED