rails-rfc6570 3.5.1 → 3.6.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +2 -2
  4. data/lib/rails/rfc6570/version.rb +2 -2
  5. data/rails-rfc6570.gemspec +1 -1
  6. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.1.1/CHANGELOG.md +477 -0
  7. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.1.1/CHANGELOG.md +139 -0
  8. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.1.1/CHANGELOG.md +465 -0
  9. data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/CHANGELOG.md +55 -46
  10. data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/README.md +6 -6
  11. data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/addressable.gemspec +6 -6
  12. data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/README.md +299 -0
  13. data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/json.gemspec +62 -0
  14. data/vendor/bundle/ruby/3.4.0/gems/{minitest-5.25.5 → minitest-5.26.2}/README.rdoc +10 -8
  15. data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/CHANGELOG.md +8 -0
  16. data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/README.md +38 -29
  17. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/CHANGELOG.md +81 -14
  18. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/README.md +8 -0
  19. data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/rake.gemspec +1 -1
  20. data/vendor/bundle/ruby/3.4.0/specifications/{actionpack-8.0.3.gemspec → actionpack-8.1.1.gemspec} +6 -6
  21. data/vendor/bundle/ruby/3.4.0/specifications/{actionview-8.0.3.gemspec → actionview-8.1.1.gemspec} +6 -6
  22. data/vendor/bundle/ruby/3.4.0/specifications/{activesupport-8.0.3.gemspec → activesupport-8.1.1.gemspec} +4 -4
  23. data/vendor/bundle/ruby/3.4.0/specifications/{addressable-2.8.7.gemspec → addressable-2.8.8.gemspec} +6 -6
  24. data/vendor/bundle/ruby/3.4.0/specifications/{bigdecimal-3.2.3.gemspec → bigdecimal-3.3.1.gemspec} +2 -2
  25. data/vendor/bundle/ruby/3.4.0/specifications/{connection_pool-2.5.4.gemspec → connection_pool-2.5.5.gemspec} +2 -2
  26. data/vendor/bundle/ruby/3.4.0/specifications/json-2.16.0.gemspec +0 -0
  27. data/vendor/bundle/ruby/3.4.0/specifications/{minitest-5.25.5.gemspec → minitest-5.26.2.gemspec} +6 -6
  28. data/vendor/bundle/ruby/3.4.0/specifications/{public_suffix-6.0.2.gemspec → public_suffix-7.0.0.gemspec} +5 -5
  29. data/vendor/bundle/ruby/3.4.0/specifications/{rack-3.2.1.gemspec → rack-3.2.4.gemspec} +2 -2
  30. data/vendor/bundle/ruby/3.4.0/specifications/{rake-13.3.0.gemspec → rake-13.3.1.gemspec} +4 -4
  31. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-3.13.1.gemspec → rspec-3.13.2.gemspec} +4 -4
  32. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-core-3.13.5.gemspec → rspec-core-3.13.6.gemspec} +4 -4
  33. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-mocks-3.13.5.gemspec → rspec-mocks-3.13.7.gemspec} +5 -5
  34. data/vendor/bundle/ruby/3.4.0/specifications/{uri-1.0.3.gemspec → uri-1.1.1.gemspec} +4 -4
  35. metadata +55 -55
  36. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.3/CHANGELOG.md +0 -285
  37. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.3/CHANGELOG.md +0 -129
  38. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.3/CHANGELOG.md +0 -309
  39. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/README.md +0 -138
  40. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/benchmark.gemspec +0 -32
  41. data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.1.gemspec +0 -23
  42. /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/MIT-LICENSE +0 -0
  43. /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/README.rdoc +0 -0
  44. /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/MIT-LICENSE +0 -0
  45. /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/README.rdoc +0 -0
  46. /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/MIT-LICENSE +0 -0
  47. /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/README.rdoc +0 -0
  48. /data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/LICENSE.txt +0 -0
  49. /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/LICENSE +0 -0
  50. /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/bigdecimal.gemspec +0 -0
  51. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/LICENSE +0 -0
  52. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/README.md +0 -0
  53. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/connection_pool.gemspec +0 -0
  54. /data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/LICENSE.txt +0 -0
  55. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/MIT-LICENSE +0 -0
  56. /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/MIT-LICENSE +0 -0
  57. /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/README.rdoc +0 -0
  58. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/LICENSE.md +0 -0
  59. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/README.md +0 -0
  60. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/LICENSE.md +0 -0
  61. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/README.md +0 -0
  62. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/LICENSE.md +0 -0
  63. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/README.md +0 -0
  64. /data/vendor/bundle/ruby/3.4.0/gems/{uri-1.0.3 → uri-1.1.1}/README.md +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3b9e7af3153e5a26e9f9a61c0c31968d2f830abacb236e1827bcac8e506f484
4
- data.tar.gz: 1e8c62d9e35f2e68e7b79d6fbef0932be6b762d87095e6f43b686441d50fc052
3
+ metadata.gz: 7180bf042b5e9ae961b76e070e16de310f816a6d8b469937b676ad829155fb49
4
+ data.tar.gz: 22c417d18e857d810464dc36e49e231171db69f08fe10f908e4cc7af341e093f
5
5
  SHA512:
6
- metadata.gz: 85e72c2a7b91d1e076a8bf03c6edb115fa77a2e1e84893c896b80af5ac81c4baf6ac8d843c23a9cb017b659888d19e93ca0efb5d36835827102f5e68a43fc3b5
7
- data.tar.gz: dc660af0bf6f1c901998fa1cc62ecf5e2d4ab41265beaa063f1354577bf555502bc436a0464e123e6f6532fd087f53459f91f04b732ac36e2372969324bbc64c
6
+ metadata.gz: 44ed4cc8d3749ac9ab79d029f4fc0a0009754cd5637bb73598e4e88d3487c22f9155809f7ad4b11eec5f4270a58b0b1b1d24039c970a433fcab277216836c3d8
7
+ data.tar.gz: 2cad9c5dc204487b76f601b7430c98bbe2ee9b8458513b917139de930a80b26f6cb9e0b3dd27e31e34916f15684cca2960cfc01f1744ec1c0a670ebcb8b5b2ec
data/CHANGELOG.md CHANGED
@@ -15,6 +15,14 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Ch
15
15
 
16
16
  ### Breaks
17
17
 
18
+ ## 3.6.0 - (2025-11-28)
19
+
20
+ ---
21
+
22
+ ### New
23
+
24
+ - Add support for Rails 8.1
25
+
18
26
  ## 3.5.1 - (2025-09-28)
19
27
 
20
28
  ---
data/README.md CHANGED
@@ -5,14 +5,14 @@
5
5
 
6
6
  Pragmatic access to your Rails routes as RFC6570 URI templates.
7
7
 
8
- Tested with Rails 6.1, 7.0, 7.1, 7.2, 8.0 and Ruby 2.7, 3.0, 3.1, 3.2, 3.3, and 3.4.
8
+ Tested with Rails 6.1, 7.0, 7.1, 7.2, 8.0, 8.1, and Ruby 2.7, 3.0, 3.1, 3.2, 3.3, and 3.4.
9
9
 
10
10
  ## Installation
11
11
 
12
12
  Add this line to your application's Gemfile:
13
13
 
14
14
  ```ruby
15
- gem 'rails-rfc6570', '~> 3.5'
15
+ gem 'rails-rfc6570', '~> 3.6'
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -4,8 +4,8 @@ module Rails
4
4
  module RFC6570
5
5
  module VERSION
6
6
  MAJOR = 3
7
- MINOR = 5
8
- PATCH = 1
7
+ MINOR = 6
8
+ PATCH = 0
9
9
  STAGE = nil
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH, STAGE].compact.join('.').freeze
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.required_ruby_version = '>= 2.7'
29
29
 
30
- spec.add_dependency 'actionpack', '>= 4.2', '< 8.1'
30
+ spec.add_dependency 'actionpack', '>= 4.2', '< 8.2'
31
31
  spec.add_dependency 'addressable', '~> 2.3'
32
32
  end
@@ -0,0 +1,477 @@
1
+ ## Rails 8.1.1 (October 28, 2025) ##
2
+
3
+ * Allow methods starting with underscore to be action methods.
4
+
5
+ Disallowing methods starting with an underscore from being action methods
6
+ was an unintended side effect of the performance optimization in
7
+ 207a254.
8
+
9
+ Fixes #55985.
10
+
11
+ *Rafael Mendonça França*
12
+
13
+
14
+ ## Rails 8.1.0 (October 22, 2025) ##
15
+
16
+ * Submit test requests using `as: :html` with `Content-Type: x-www-form-urlencoded`
17
+
18
+ *Sean Doyle*
19
+
20
+ * Add link-local IP ranges to `ActionDispatch::RemoteIp` default proxies.
21
+
22
+ Link-local addresses (`169.254.0.0/16` for IPv4 and `fe80::/10` for IPv6)
23
+ are now included in the default trusted proxy list, similar to private IP ranges.
24
+
25
+ *Adam Daniels*
26
+
27
+ * `remote_ip` will no longer ignore IPs in X-Forwarded-For headers if they
28
+ are accompanied by port information.
29
+
30
+ *Duncan Brown*, *Prevenios Marinos*, *Masafumi Koba*, *Adam Daniels*
31
+
32
+ * Add `action_dispatch.verbose_redirect_logs` setting that logs where redirects were called from.
33
+
34
+ Similar to `active_record.verbose_query_logs` and `active_job.verbose_enqueue_logs`, this adds a line in your logs that shows where a redirect was called from.
35
+
36
+ Example:
37
+
38
+ ```
39
+ Redirected to http://localhost:3000/posts/1
40
+ ↳ app/controllers/posts_controller.rb:32:in `block (2 levels) in create'
41
+ ```
42
+
43
+ *Dennis Paagman*
44
+
45
+ * Add engine route filtering and better formatting in `bin/rails routes`.
46
+
47
+ Allow engine routes to be filterable in the routing inspector, and
48
+ improve formatting of engine routing output.
49
+
50
+ Before:
51
+ ```
52
+ > bin/rails routes -e engine_only
53
+ No routes were found for this grep pattern.
54
+ For more information about routes, see the Rails guide: https://guides.rubyonrails.org/routing.html.
55
+ ```
56
+
57
+ After:
58
+ ```
59
+ > bin/rails routes -e engine_only
60
+ Routes for application:
61
+ No routes were found for this grep pattern.
62
+ For more information about routes, see the Rails guide: https://guides.rubyonrails.org/routing.html.
63
+
64
+ Routes for Test::Engine:
65
+ Prefix Verb URI Pattern Controller#Action
66
+ engine GET /engine_only(.:format) a#b
67
+ ```
68
+
69
+ *Dennis Paagman*, *Gannon McGibbon*
70
+
71
+ * Add structured events for Action Pack and Action Dispatch:
72
+ - `action_dispatch.redirect`
73
+ - `action_controller.request_started`
74
+ - `action_controller.request_completed`
75
+ - `action_controller.callback_halted`
76
+ - `action_controller.rescue_from_handled`
77
+ - `action_controller.file_sent`
78
+ - `action_controller.redirected`
79
+ - `action_controller.data_sent`
80
+ - `action_controller.unpermitted_parameters`
81
+ - `action_controller.fragment_cache`
82
+
83
+ *Adrianna Chang*
84
+
85
+ * URL helpers for engines mounted at the application root handle `SCRIPT_NAME` correctly.
86
+
87
+ Fixed an issue where `SCRIPT_NAME` is not applied to paths generated for routes in an engine
88
+ mounted at "/".
89
+
90
+ *Mike Dalessio*
91
+
92
+ * Update `ActionController::Metal::RateLimiting` to support passing method names to `:by` and `:with`
93
+
94
+ ```ruby
95
+ class SignupsController < ApplicationController
96
+ rate_limit to: 10, within: 1.minute, with: :redirect_with_flash
97
+
98
+ private
99
+ def redirect_with_flash
100
+ redirect_to root_url, alert: "Too many requests!"
101
+ end
102
+ end
103
+ ```
104
+
105
+ *Sean Doyle*
106
+
107
+ * Optimize `ActionDispatch::Http::URL.build_host_url` when protocol is included in host.
108
+
109
+ When using URL helpers with a host that includes the protocol (e.g., `{ host: "https://example.com" }`),
110
+ skip unnecessary protocol normalization and string duplication since the extracted protocol is already
111
+ in the correct format. This eliminates 2 string allocations per URL generation and provides a ~10%
112
+ performance improvement for this case.
113
+
114
+ *Joshua Young*, *Hartley McGuire*
115
+
116
+ * Allow `action_controller.logger` to be disabled by setting it to `nil` or `false` instead of always defaulting to `Rails.logger`.
117
+
118
+ *Roberto Miranda*
119
+
120
+ * Remove deprecated support to a route to multiple paths.
121
+
122
+ *Rafael Mendonça França*
123
+
124
+ * Remove deprecated support for using semicolons as a query string separator.
125
+
126
+ Before:
127
+
128
+ ```ruby
129
+ ActionDispatch::QueryParser.each_pair("foo=bar;baz=quux").to_a
130
+ # => [["foo", "bar"], ["baz", "quux"]]
131
+ ```
132
+
133
+ After:
134
+
135
+ ```ruby
136
+ ActionDispatch::QueryParser.each_pair("foo=bar;baz=quux").to_a
137
+ # => [["foo", "bar;baz=quux"]]
138
+ ```
139
+
140
+ *Rafael Mendonça França*
141
+
142
+ * Remove deprecated support to skipping over leading brackets in parameter names in the parameter parser.
143
+
144
+ Before:
145
+
146
+ ```ruby
147
+ ActionDispatch::ParamBuilder.from_query_string("[foo]=bar") # => { "foo" => "bar" }
148
+ ActionDispatch::ParamBuilder.from_query_string("[foo][bar]=baz") # => { "foo" => { "bar" => "baz" } }
149
+ ```
150
+
151
+ After:
152
+
153
+ ```ruby
154
+ ActionDispatch::ParamBuilder.from_query_string("[foo]=bar") # => { "[foo]" => "bar" }
155
+ ActionDispatch::ParamBuilder.from_query_string("[foo][bar]=baz") # => { "[foo]" => { "bar" => "baz" } }
156
+ ```
157
+
158
+ *Rafael Mendonça França*
159
+
160
+ * Deprecate `Rails.application.config.action_dispatch.ignore_leading_brackets`.
161
+
162
+ *Rafael Mendonça França*
163
+
164
+ * Raise `ActionController::TooManyRequests` error from `ActionController::RateLimiting`
165
+
166
+ Requests that exceed the rate limit raise an `ActionController::TooManyRequests` error.
167
+ By default, Action Dispatch rescues the error and responds with a `429 Too Many Requests` status.
168
+
169
+ *Sean Doyle*
170
+
171
+ * Add .md/.markdown as Markdown extensions and add a default `markdown:` renderer:
172
+
173
+ ```ruby
174
+ class Page
175
+ def to_markdown
176
+ body
177
+ end
178
+ end
179
+
180
+ class PagesController < ActionController::Base
181
+ def show
182
+ @page = Page.find(params[:id])
183
+
184
+ respond_to do |format|
185
+ format.html
186
+ format.md { render markdown: @page }
187
+ end
188
+ end
189
+ end
190
+ ```
191
+
192
+ *DHH*
193
+
194
+ * Add headers to engine routes inspection command
195
+
196
+ *Petrik de Heus*
197
+
198
+ * Add "Copy as text" button to error pages
199
+
200
+ *Mikkel Malmberg*
201
+
202
+ * Add `scope:` option to `rate_limit` method.
203
+
204
+ Previously, it was not possible to share a rate limit count between several controllers, since the count was by
205
+ default separate for each controller.
206
+
207
+ Now, the `scope:` option solves this problem.
208
+
209
+ ```ruby
210
+ class APIController < ActionController::API
211
+ rate_limit to: 2, within: 2.seconds, scope: "api"
212
+ end
213
+
214
+ class API::PostsController < APIController
215
+ # ...
216
+ end
217
+
218
+ class API::UsersController < APIController
219
+ # ...
220
+ end
221
+ ```
222
+
223
+ *ArthurPV*, *Kamil Hanus*
224
+
225
+ * Add support for `rack.response_finished` callbacks in ActionDispatch::Executor.
226
+
227
+ The executor middleware now supports deferring completion callbacks to later
228
+ in the request lifecycle by utilizing Rack's `rack.response_finished` mechanism,
229
+ when available. This enables applications to define `rack.response_finished` callbacks
230
+ that may rely on state that would be cleaned up by the executor's completion callbacks.
231
+
232
+ *Adrianna Chang*, *Hartley McGuire*
233
+
234
+ * Produce a log when `rescue_from` is invoked.
235
+
236
+ *Steven Webb*, *Jean Boussier*
237
+
238
+ * Allow hosts redirects from `hosts` Rails configuration
239
+
240
+ ```ruby
241
+ config.action_controller.allowed_redirect_hosts << "example.com"
242
+ ```
243
+
244
+ *Kevin Robatel*
245
+
246
+ * `rate_limit.action_controller` notification has additional payload
247
+
248
+ additional values: count, to, within, by, name, cache_key
249
+
250
+ *Jonathan Rochkind*
251
+
252
+ * Add JSON support to the built-in health controller.
253
+
254
+ The health controller now responds to JSON requests with a structured response
255
+ containing status and timestamp information. This makes it easier for monitoring
256
+ tools and load balancers to consume health check data programmatically.
257
+
258
+ ```ruby
259
+ # /up.json
260
+ {
261
+ "status": "up",
262
+ "timestamp": "2025-09-19T12:00:00Z"
263
+ }
264
+ ```
265
+
266
+ *Francesco Loreti*, *Juan Vásquez*
267
+
268
+ * Allow to open source file with a crash from the browser.
269
+
270
+ *Igor Kasyanchuk*
271
+
272
+ * Always check query string keys for valid encoding just like values are checked.
273
+
274
+ *Casper Smits*
275
+
276
+ * Always return empty body for HEAD requests in `PublicExceptions` and
277
+ `DebugExceptions`.
278
+
279
+ This is required by `Rack::Lint` (per RFC9110).
280
+
281
+ *Hartley McGuire*
282
+
283
+ * Add comprehensive support for HTTP Cache-Control request directives according to RFC 9111.
284
+
285
+ Provides a `request.cache_control_directives` object that gives access to request cache directives:
286
+
287
+ ```ruby
288
+ # Boolean directives
289
+ request.cache_control_directives.only_if_cached? # => true/false
290
+ request.cache_control_directives.no_cache? # => true/false
291
+ request.cache_control_directives.no_store? # => true/false
292
+ request.cache_control_directives.no_transform? # => true/false
293
+
294
+ # Value directives
295
+ request.cache_control_directives.max_age # => integer or nil
296
+ request.cache_control_directives.max_stale # => integer or nil (or true for valueless max-stale)
297
+ request.cache_control_directives.min_fresh # => integer or nil
298
+ request.cache_control_directives.stale_if_error # => integer or nil
299
+
300
+ # Special helpers for max-stale
301
+ request.cache_control_directives.max_stale? # => true if max-stale present (with or without value)
302
+ request.cache_control_directives.max_stale_unlimited? # => true only for valueless max-stale
303
+ ```
304
+
305
+ Example usage:
306
+
307
+ ```ruby
308
+ def show
309
+ if request.cache_control_directives.only_if_cached?
310
+ @article = Article.find_cached(params[:id])
311
+ return head(:gateway_timeout) if @article.nil?
312
+ else
313
+ @article = Article.find(params[:id])
314
+ end
315
+
316
+ render :show
317
+ end
318
+ ```
319
+
320
+ *egg528*
321
+
322
+ * Add assert_in_body/assert_not_in_body as the simplest way to check if a piece of text is in the response body.
323
+
324
+ *DHH*
325
+
326
+ * Include cookie name when calculating maximum allowed size.
327
+
328
+ *Hartley McGuire*
329
+
330
+ * Implement `must-understand` directive according to RFC 9111.
331
+
332
+ The `must-understand` directive indicates that a cache must understand the semantics of the response status code, or discard the response. This directive is enforced to be used only with `no-store` to ensure proper cache behavior.
333
+
334
+ ```ruby
335
+ class ArticlesController < ApplicationController
336
+ def show
337
+ @article = Article.find(params[:id])
338
+
339
+ if @article.special_format?
340
+ must_understand
341
+ render status: 203 # Non-Authoritative Information
342
+ else
343
+ fresh_when @article
344
+ end
345
+ end
346
+ end
347
+ ```
348
+
349
+ *heka1024*
350
+
351
+ * The JSON renderer doesn't escape HTML entities or Unicode line separators anymore.
352
+
353
+ Using `render json:` will no longer escape `<`, `>`, `&`, `U+2028` and `U+2029` characters that can cause errors
354
+ when the resulting JSON is embedded in JavaScript, or vulnerabilities when the resulting JSON is embedded in HTML.
355
+
356
+ Since the renderer is used to return a JSON document as `application/json`, it's typically not necessary to escape
357
+ those characters, and it improves performance.
358
+
359
+ Escaping will still occur when the `:callback` option is set, since the JSON is used as JavaScript code in this
360
+ situation (JSONP).
361
+
362
+ You can use the `:escape` option or set `config.action_controller.escape_json_responses` to `true` to restore the
363
+ escaping behavior.
364
+
365
+ ```ruby
366
+ class PostsController < ApplicationController
367
+ def index
368
+ render json: Post.last(30), escape: true
369
+ end
370
+ end
371
+ ```
372
+
373
+ *Étienne Barrié*, *Jean Boussier*
374
+
375
+ * Load lazy route sets before inserting test routes
376
+
377
+ Without loading lazy route sets early, we miss `after_routes_loaded` callbacks, or risk
378
+ invoking them with the test routes instead of the real ones if another load is triggered by an engine.
379
+
380
+ *Gannon McGibbon*
381
+
382
+ * Raise `AbstractController::DoubleRenderError` if `head` is called after rendering.
383
+
384
+ After this change, invoking `head` will lead to an error if response body is already set:
385
+
386
+ ```ruby
387
+ class PostController < ApplicationController
388
+ def index
389
+ render locals: {}
390
+ head :ok
391
+ end
392
+ end
393
+ ```
394
+
395
+ *Iaroslav Kurbatov*
396
+
397
+ * The Cookie Serializer can now serialize an Active Support SafeBuffer when using message pack.
398
+
399
+ Such code would previously produce an error if an application was using messagepack as its cookie serializer.
400
+
401
+ ```ruby
402
+ class PostController < ApplicationController
403
+ def index
404
+ flash.notice = t(:hello_html) # This would try to serialize a SafeBuffer, which was not possible.
405
+ end
406
+ end
407
+ ```
408
+
409
+ *Edouard Chin*
410
+
411
+ * Fix `Rails.application.reload_routes!` from clearing almost all routes.
412
+
413
+ When calling `Rails.application.reload_routes!` inside a middleware of
414
+ a Rake task, it was possible under certain conditions that all routes would be cleared.
415
+ If ran inside a middleware, this would result in getting a 404 on most page you visit.
416
+ This issue was only happening in development.
417
+
418
+ *Edouard Chin*
419
+
420
+ * Add resource name to the `ArgumentError` that's raised when invalid `:only` or `:except` options are given to `#resource` or `#resources`
421
+
422
+ This makes it easier to locate the source of the problem, especially for routes drawn by gems.
423
+
424
+ Before:
425
+ ```
426
+ :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
427
+ ```
428
+
429
+ After:
430
+ ```
431
+ Route `resources :products` - :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
432
+ ```
433
+
434
+ *Jeremy Green*
435
+
436
+ * A route pointing to a non-existing controller now returns a 500 instead of a 404.
437
+
438
+ A controller not existing isn't a routing error that should result
439
+ in a 404, but a programming error that should result in a 500 and
440
+ be reported.
441
+
442
+ Until recently, this was hard to untangle because of the support
443
+ for dynamic `:controller` segment in routes, but since this is
444
+ deprecated and will be removed in Rails 8.1, we can now easily
445
+ not consider missing controllers as routing errors.
446
+
447
+ *Jean Boussier*
448
+
449
+ * Add `check_collisions` option to `ActionDispatch::Session::CacheStore`.
450
+
451
+ Newly generated session ids use 128 bits of randomness, which is more than
452
+ enough to ensure collisions can't happen, but if you need to harden sessions
453
+ even more, you can enable this option to check in the session store that the id
454
+ is indeed free you can enable that option. This however incurs an extra write
455
+ on session creation.
456
+
457
+ *Shia*
458
+
459
+ * In ExceptionWrapper, match backtrace lines with built templates more often,
460
+ allowing improved highlighting of errors within do-end blocks in templates.
461
+ Fix for Ruby 3.4 to match new method labels in backtrace.
462
+
463
+ *Martin Emde*
464
+
465
+ * Allow setting content type with a symbol of the Mime type.
466
+
467
+ ```ruby
468
+ # Before
469
+ response.content_type = "text/html"
470
+
471
+ # After
472
+ response.content_type = :html
473
+ ```
474
+
475
+ *Petrik de Heus*
476
+
477
+ Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/actionpack/CHANGELOG.md) for previous changes.
@@ -0,0 +1,139 @@
1
+ ## Rails 8.1.1 (October 28, 2025) ##
2
+
3
+ * Respect `remove_hidden_field_autocomplete` config in form builder `hidden_field`.
4
+
5
+ *Rafael Mendonça França*
6
+
7
+
8
+ ## Rails 8.1.0 (October 22, 2025) ##
9
+
10
+ * The BEGIN template annotation/comment was previously printed on the same line as the following element. We now insert a newline inside the comment so it spans two lines without adding visible whitespace to the HTML output to enhance readability.
11
+
12
+ Before:
13
+ ```
14
+ <!-- BEGIN /Users/siaw23/Desktop/rails/actionview/test/fixtures/actionpack/test/greeting.html.erb --><p>This is grand!</p>
15
+ ```
16
+
17
+ After:
18
+ ```
19
+ <!-- BEGIN /Users/siaw23/Desktop/rails/actionview/test/fixtures/actionpack/test/greeting.html.erb
20
+ --><p>This is grand!</p>
21
+ ```
22
+ *Emmanuel Hayford*
23
+
24
+ * Add structured events for Action View:
25
+ - `action_view.render_template`
26
+ - `action_view.render_partial`
27
+ - `action_view.render_layout`
28
+ - `action_view.render_collection`
29
+ - `action_view.render_start`
30
+
31
+ *Gannon McGibbon*
32
+
33
+ * Fix label with `for` option not getting prefixed by form `namespace` value
34
+
35
+ *Abeid Ahmed*, *Hartley McGuire*
36
+
37
+ * Add `fetchpriority` to Link headers to match HTML generated by `preload_link_tag`.
38
+
39
+ *Guillermo Iguaran*
40
+
41
+ * Add CSP `nonce` to Link headers generated by `preload_link_tag`.
42
+
43
+ *Alexander Gitter*
44
+
45
+ * Allow `current_page?` to match against specific HTTP method(s) with a `method:` option.
46
+
47
+ *Ben Sheldon*
48
+
49
+ * Remove `autocomplete="off"` on hidden inputs generated by the following
50
+ tags:
51
+
52
+ * `form_tag`, `token_tag`, `method_tag`
53
+
54
+ As well as the hidden parameter fields included in `button_to`,
55
+ `check_box`, `select` (with `multiple`) and `file_field` forms.
56
+
57
+ *nkulway*
58
+
59
+ * Enable configuring the strategy for tracking dependencies between Action
60
+ View templates.
61
+
62
+ The existing `:regex` strategy is kept as the default, but with
63
+ `load_defaults 8.1` the strategy will be `:ruby` (using a real Ruby parser).
64
+
65
+ *Hartley McGuire*
66
+
67
+ * Introduce `relative_time_in_words` helper
68
+
69
+ ```ruby
70
+ relative_time_in_words(3.minutes.from_now) # => "in 3 minutes"
71
+ relative_time_in_words(3.minutes.ago) # => "3 minutes ago"
72
+ relative_time_in_words(10.seconds.ago, include_seconds: true) # => "less than 10 seconds ago"
73
+ ```
74
+
75
+ *Matheus Richard*
76
+
77
+ * Make `nonce: false` remove the nonce attribute from `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag`.
78
+
79
+ *francktrouillez*
80
+
81
+ * Add `dom_target` helper to create `dom_id`-like strings from an unlimited
82
+ number of objects.
83
+
84
+ *Ben Sheldon*
85
+
86
+ * Respect `html_options[:form]` when `collection_checkboxes` generates the
87
+ hidden `<input>`.
88
+
89
+ *Riccardo Odone*
90
+
91
+ * Layouts have access to local variables passed to `render`.
92
+
93
+ This fixes #31680 which was a regression in Rails 5.1.
94
+
95
+ *Mike Dalessio*
96
+
97
+ * Argument errors related to strict locals in templates now raise an
98
+ `ActionView::StrictLocalsError`, and all other argument errors are reraised as-is.
99
+
100
+ Previously, any `ArgumentError` raised during template rendering was swallowed during strict
101
+ local error handling, so that an `ArgumentError` unrelated to strict locals (e.g., a helper
102
+ method invoked with incorrect arguments) would be replaced by a similar `ArgumentError` with an
103
+ unrelated backtrace, making it difficult to debug templates.
104
+
105
+ Now, any `ArgumentError` unrelated to strict locals is reraised, preserving the original
106
+ backtrace for developers.
107
+
108
+ Also note that `ActionView::StrictLocalsError` is a subclass of `ArgumentError`, so any existing
109
+ code that rescues `ArgumentError` will continue to work.
110
+
111
+ Fixes #52227.
112
+
113
+ *Mike Dalessio*
114
+
115
+ * Improve error highlighting of multi-line methods in ERB templates or
116
+ templates where the error occurs within a do-end block.
117
+
118
+ *Martin Emde*
119
+
120
+ * Fix a crash in ERB template error highlighting when the error occurs on a
121
+ line in the compiled template that is past the end of the source template.
122
+
123
+ *Martin Emde*
124
+
125
+ * Improve reliability of ERB template error highlighting.
126
+ Fix infinite loops and crashes in highlighting and
127
+ improve tolerance for alternate ERB handlers.
128
+
129
+ *Martin Emde*
130
+
131
+ * Allow `hidden_field` and `hidden_field_tag` to accept a custom autocomplete value.
132
+
133
+ *brendon*
134
+
135
+ * Add a new configuration `content_security_policy_nonce_auto` for automatically adding a nonce to the tags affected by the directives specified by the `content_security_policy_nonce_directives` configuration option.
136
+
137
+ *francktrouillez*
138
+
139
+ Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/actionview/CHANGELOG.md) for previous changes.