recourse 8.0.0 → 8.0.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: 9fa259fe4854972da8f5269d6d63c00851e061bd0cd6d490db9caa31ca38be22
4
- data.tar.gz: 6671b757de11387812c82d201476e65389110398fce8d1f3afe7dce1f1fd46a2
3
+ metadata.gz: 7de35fdbec1f8879c4fb6636bf023bd6ed9e585b3d63fc95c0d76c4f0c36fa49
4
+ data.tar.gz: 5e3a1779c3153d4089d2039f074525986963bbc77a5ff6827995dffed74565cd
5
5
  SHA512:
6
- metadata.gz: 004ce92287a95a326b937a33ee04737753546d46eae1f6dbcb2cb2a41480e1f8e3caca92f2f18fb5dfb9f2a76d9face21adfc4e00443ae1e2a354e74d76d2b20
7
- data.tar.gz: ca43947c8aae99999a3f0332d737e31d229f6f0934315fddf7393e39650c13e5e9e4681a1cba4219e6cb9f683a363cbe6caea8e3c253b0ee2be3c50969b01655
6
+ metadata.gz: 62dcf7cd0da6acb1af4925cebdc9b9186cd28984d19979acfdbaae7642c697bb77ace967cf1fe247dc3220e187f54d45c5ee80a199880d90041788d2f14d8c1b
7
+ data.tar.gz: dda6c4c65b5d3e72b56bdea47101f979d5d9f6a0c0452b53b5e1d655431d2cf4f238149b20bdd0b6dac9b000bc600d5474a4cfa8b7ac32ac01ae5e57bd55816c
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
+ ## 8.0.1 - 2026-10-14
11
+
12
+ * [FIX] Guard the screens with `prepend_before_action`, not `before_action`
13
+
14
+ Since 8.0.0 a record's pages look it up through `recourse_relation` before any
15
+ `before_action` of the host's runs, so a relation reading who is signed in -- an admin's
16
+ own chats -- found nobody and raised. The README, the guides and the comments now say
17
+ `prepend_before_action :authenticate!`, which runs the guard first.
18
+
10
19
  ## 8.0.0 - 2026-10-14
11
20
 
12
21
  * [BREAKING] A record's own pages find it among the rows `recourse_relation` lists
data/README.md CHANGED
@@ -168,13 +168,18 @@ which the host defines to put behavior above every screen at once:
168
168
 
169
169
  ```ruby
170
170
  class RecoursesController < Recourse::BaseController
171
- before_action :authenticate!
171
+ prepend_before_action :authenticate!
172
172
  end
173
173
  ```
174
174
 
175
+ `prepend_before_action`, so the guard runs before the gem's own: a record's pages look
176
+ it up through `recourse_relation`, and a relation that reads who is signed in finds
177
+ nobody yet if the guard comes after.
178
+
175
179
  A controller the app already defines is left alone, and one line of it is usually
176
180
  enough: `recourse_relation` puts a scope of your own behind a table the gem draws
177
- whole, and behind the pages of each record in it, and `find_resource` finds a singular record the parent names no association for.
181
+ whole, and behind the pages of each record in it, and `find_resource` finds a singular
182
+ record the parent names no association for.
178
183
 
179
184
  ## Step 5. Enjoy the extras
180
185
 
@@ -1,7 +1,7 @@
1
1
  module Recourse
2
2
  # Everything a recoursed screen does, in a class of its own so a host can put
3
3
  # its own behavior above it — `class RecoursesController < Recourse::BaseController`
4
- # with a `before_action :authenticate!` guards every screen the gem serves.
4
+ # with a `prepend_before_action :authenticate!` guards every screen the gem serves.
5
5
  class BaseController < ApplicationController
6
6
  include Pagy::Method, Positioned, AttachmentResolution, AttachmentWriting,
7
7
  Landing, Paging, ListResolution, ParameterResolution, ParentNaming,
@@ -1,6 +1,6 @@
1
1
  # The superclass every recoursed controller gets, and what puts its templates
2
2
  # under `recourses/`. A host defines this class itself — its `app/controllers`
3
- # comes first — to put a `before_action` of its own above every screen.
3
+ # comes first — to put a `prepend_before_action` of its own above every screen.
4
4
  class RecoursesController < Recourse::BaseController
5
5
  # Empty on purpose: the behavior is the base class, so a host redefining this
6
6
  # one loses none of it.
@@ -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 = '8.0.0'
3
+ VERSION = '8.0.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: 8.0.0
4
+ version: 8.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob