recourse 7.6.0 → 7.6.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: a2a20bbc5915a1d57b72fb203edfdd05c1bd5f994c428b0520f2ef9af73ec3f0
4
- data.tar.gz: a6ba069086c36351dd7072d09a2909f64bd17a84346d8ef31921fd953592a61d
3
+ metadata.gz: f8e518ee85484be8de5cc4a1533a9b8677d97417706a8c93210a02b2ad067040
4
+ data.tar.gz: 98e1b1f4173a12c8935783d5194715affd66ebfd33de377b0010c86352be83c4
5
5
  SHA512:
6
- metadata.gz: c98284ac83b4a7b5419f747e69028dff262aa5281745c61bc8fbd01d7dd0eeb07dc4706ffbbb531133c8c8bc1b2478e75b55a12484cb39a6ca2b539df2821ea5
7
- data.tar.gz: cdede705768f5b68438efd3d1e80f1120827614a16d8bf11b9556aad5107184f4691d18e893a3d2ee8e1223a1ceef92f74c9026c60d278c6e3d904aa332edae9
6
+ metadata.gz: 11c62eca29bcd4fdd171ff3d1fe2f5829b41ff0d4d057cff38a8c24749b5bb8d610962906746ba828e6163d7ad0ac89bb0e7a5a1ef44b84250967b95e4173708
7
+ data.tar.gz: f4801d3c52a5228fe075f50940fd01833c81966c232b17e0d093dffda29d0b75f93e73cf91d13fdf05a9a55bd41e7adaad2c84653d8a5f5b79fe7102c8146458
data/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 7.6.1 - 2026-09-20
11
+
12
+ * [FIX] The three write seams are marked `@api private`
13
+
14
+ `create_resource`, `update_resource` and `destroy_resource` are how the gem writes a
15
+ record, not a shelf for a host to reach. A host with something of its own to do on a
16
+ write writes the action.
17
+
18
+ The comment over `destroy_resource` still described the `destroy!` it stopped being in
19
+ 7.2.0, and said the opposite of what it now does.
20
+
10
21
  ## 7.6.0 - 2026-09-20
11
22
 
12
23
  * [CHANGE] The layout titles the page, so a host template cannot lose it
@@ -9,17 +9,20 @@ module Recourse
9
9
 
10
10
  # A new record, then the files that came with it, in one transaction: a record
11
11
  # half-saved is worse than one not saved.
12
+ # @api private
12
13
  def create_resource(record)
13
14
  record.transaction { super && attach_submitted_files(record) }
14
15
  end
15
16
 
16
- # The same for one that already exists.
17
+ # A record that already exists, then the files that came with it.
18
+ # @api private
17
19
  def update_resource(record)
18
20
  super && attach_submitted_files(record)
19
21
  end
20
22
 
21
23
  # On a page of what a record has attached, the row between the two goes and the
22
24
  # file stays for whatever else points at it; everywhere else the record itself goes.
25
+ # @api private
23
26
  def destroy_resource(record)
24
27
  return super unless attachment_reflection
25
28
 
@@ -7,14 +7,16 @@ module Recourse
7
7
 
8
8
  # A new record, unless a typed label named more than one row, which is answered on
9
9
  # the form rather than by writing a guess.
10
+ # @api private
10
11
  def create_resource(record)
11
12
  return false if ambiguous_references? record
12
13
 
13
14
  record.save
14
15
  end
15
16
 
16
- # The same for one that already exists. The parameters are read before the refusal
17
- # is asked about, since reading them is what notices an ambiguous label.
17
+ # A record that already exists, under the same refusal. The parameters are read
18
+ # before it is asked about, since reading them is what notices an ambiguous label.
19
+ # @api private
18
20
  def update_resource(record)
19
21
  attributes = resource_params
20
22
  return false if ambiguous_references? record
@@ -22,8 +24,9 @@ module Recourse
22
24
  record.update attributes
23
25
  end
24
26
 
25
- # And the record gone. `destroy!`, so a callback that stops one says so rather than
26
- # leaving the page claiming it worked.
27
+ # The record gone, or false where a callback refused to give it up, which the page
28
+ # says where the row still is.
29
+ # @api private
27
30
  def destroy_resource(record) = record.destroy
28
31
 
29
32
  # A foreign key whose label is typed arrives as that label, so it is looked up
@@ -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.6.0'
3
+ VERSION = '7.6.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.6.0
4
+ version: 7.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob