recourse 7.2.0 → 7.2.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: 95ef379a34df3d662d855df04690b3627584af8e5340d3bc7f9fd451569d6828
4
- data.tar.gz: 6429eefa62d743af7e1071cac2bed85618fc36dba623551d14d01f62129b2ded
3
+ metadata.gz: b5902f16def7afce17cc0aec2d67eb1255ffc504af58cbd766146a4f3e7f3077
4
+ data.tar.gz: 3e917516c8a76bdc0fe30497e02d7181a886d96f500cd765dfbe6202f4785452
5
5
  SHA512:
6
- metadata.gz: 487d50ea3bf02897f91807512d4624dd768b41483ccd5b4a4da74f4d3aa8e460c3491e3abe1739d13ca55480a985b9c93485112352c28bae5729c0969316f92b
7
- data.tar.gz: 29540aff5c10c30fca2a7c79ac0fe6ad4f572d505be2a085dfc7f3675539941c0a67358a328a431a0d39974410665a5e7891c3511e88b93cb26926ba916d707e
6
+ metadata.gz: d1a6d35fa1bd005290644f5f8981ac7a7837fda2f6bb9919b3225518ab41bacdf497d261827116b43928b1cf1f918eea3b5030de38faed3bd195aa257db6f798
7
+ data.tar.gz: e242d7c656755f01f53c1e2f3c1f9b75c89bbc5654b50a3dc44e6bb7f768c64321572c024e7d52fe036dcfc9c65bed2eaee7464815617e2294bfcbecc64350dc
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.1 - 2026-09-20
11
+
12
+ * [FIX] A refused change keeps the card it was made in
13
+
14
+ The card is drawn around a record's own pages, worked out from the action: `show` and
15
+ `edit`. A write a validation turns down draws `edit` again under the name `update`, so
16
+ the tabs went with it and the reader was left with a form and no way back.
17
+
10
18
  ## 7.2.0 - 2026-09-20
11
19
 
12
20
  * [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('recourse.deleted_error', model: human_name)
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? %w[show edit])
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
@@ -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.2.0'
3
+ VERSION = '7.2.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.2.0
4
+ version: 7.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob