actionpack 4.2.11.3 → 5.0.7.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of actionpack might be problematic. Click here for more details.

Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +890 -384
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +2 -3
  5. data/lib/abstract_controller/base.rb +28 -38
  6. data/lib/{action_controller → abstract_controller}/caching/fragments.rb +51 -11
  7. data/lib/abstract_controller/caching.rb +62 -0
  8. data/lib/abstract_controller/callbacks.rb +54 -19
  9. data/lib/abstract_controller/collector.rb +4 -9
  10. data/lib/abstract_controller/error.rb +4 -0
  11. data/lib/abstract_controller/helpers.rb +4 -3
  12. data/lib/abstract_controller/railties/routes_helpers.rb +2 -2
  13. data/lib/abstract_controller/rendering.rb +28 -18
  14. data/lib/abstract_controller/translation.rb +8 -7
  15. data/lib/abstract_controller.rb +6 -2
  16. data/lib/action_controller/api/api_rendering.rb +14 -0
  17. data/lib/action_controller/api.rb +147 -0
  18. data/lib/action_controller/base.rb +14 -11
  19. data/lib/action_controller/caching.rb +13 -58
  20. data/lib/action_controller/form_builder.rb +48 -0
  21. data/lib/action_controller/log_subscriber.rb +3 -10
  22. data/lib/action_controller/metal/basic_implicit_render.rb +11 -0
  23. data/lib/action_controller/metal/conditional_get.rb +106 -34
  24. data/lib/action_controller/metal/cookies.rb +1 -3
  25. data/lib/action_controller/metal/data_streaming.rb +14 -34
  26. data/lib/action_controller/metal/etag_with_template_digest.rb +8 -2
  27. data/lib/action_controller/metal/exceptions.rb +11 -6
  28. data/lib/action_controller/metal/force_ssl.rb +11 -11
  29. data/lib/action_controller/metal/head.rb +14 -8
  30. data/lib/action_controller/metal/helpers.rb +15 -6
  31. data/lib/action_controller/metal/http_authentication.rb +44 -35
  32. data/lib/action_controller/metal/implicit_render.rb +61 -6
  33. data/lib/action_controller/metal/instrumentation.rb +5 -5
  34. data/lib/action_controller/metal/live.rb +71 -88
  35. data/lib/action_controller/metal/mime_responds.rb +27 -42
  36. data/lib/action_controller/metal/params_wrapper.rb +9 -9
  37. data/lib/action_controller/metal/redirecting.rb +32 -9
  38. data/lib/action_controller/metal/renderers.rb +83 -40
  39. data/lib/action_controller/metal/rendering.rb +38 -6
  40. data/lib/action_controller/metal/request_forgery_protection.rb +126 -48
  41. data/lib/action_controller/metal/rescue.rb +3 -12
  42. data/lib/action_controller/metal/streaming.rb +4 -4
  43. data/lib/action_controller/metal/strong_parameters.rb +527 -134
  44. data/lib/action_controller/metal/testing.rb +1 -12
  45. data/lib/action_controller/metal/url_for.rb +12 -5
  46. data/lib/action_controller/metal.rb +88 -63
  47. data/lib/action_controller/railtie.rb +11 -7
  48. data/lib/action_controller/renderer.rb +113 -0
  49. data/lib/action_controller/template_assertions.rb +9 -0
  50. data/lib/action_controller/test_case.rb +311 -374
  51. data/lib/action_controller.rb +12 -9
  52. data/lib/action_dispatch/http/cache.rb +73 -34
  53. data/lib/action_dispatch/http/filter_parameters.rb +16 -12
  54. data/lib/action_dispatch/http/filter_redirect.rb +7 -8
  55. data/lib/action_dispatch/http/headers.rb +45 -14
  56. data/lib/action_dispatch/http/mime_negotiation.rb +42 -23
  57. data/lib/action_dispatch/http/mime_type.rb +126 -90
  58. data/lib/action_dispatch/http/mime_types.rb +3 -4
  59. data/lib/action_dispatch/http/parameter_filter.rb +19 -9
  60. data/lib/action_dispatch/http/parameters.rb +70 -40
  61. data/lib/action_dispatch/http/request.rb +144 -89
  62. data/lib/action_dispatch/http/response.rb +215 -102
  63. data/lib/action_dispatch/http/upload.rb +6 -2
  64. data/lib/action_dispatch/http/url.rb +117 -8
  65. data/lib/action_dispatch/journey/formatter.rb +47 -30
  66. data/lib/action_dispatch/journey/gtg/transition_table.rb +1 -1
  67. data/lib/action_dispatch/journey/nfa/dot.rb +0 -2
  68. data/lib/action_dispatch/journey/nfa/transition_table.rb +1 -46
  69. data/lib/action_dispatch/journey/nodes/node.rb +14 -4
  70. data/lib/action_dispatch/journey/parser.rb +2 -0
  71. data/lib/action_dispatch/journey/parser_extras.rb +8 -2
  72. data/lib/action_dispatch/journey/path/pattern.rb +38 -42
  73. data/lib/action_dispatch/journey/route.rb +88 -26
  74. data/lib/action_dispatch/journey/router/utils.rb +5 -5
  75. data/lib/action_dispatch/journey/router.rb +8 -10
  76. data/lib/action_dispatch/journey/routes.rb +14 -15
  77. data/lib/action_dispatch/journey/visitors.rb +89 -44
  78. data/lib/action_dispatch/middleware/callbacks.rb +10 -1
  79. data/lib/action_dispatch/middleware/cookies.rb +188 -134
  80. data/lib/action_dispatch/middleware/debug_exceptions.rb +128 -49
  81. data/lib/action_dispatch/middleware/debug_locks.rb +122 -0
  82. data/lib/action_dispatch/middleware/exception_wrapper.rb +21 -21
  83. data/lib/action_dispatch/middleware/executor.rb +19 -0
  84. data/lib/action_dispatch/middleware/flash.rb +66 -45
  85. data/lib/action_dispatch/middleware/params_parser.rb +32 -46
  86. data/lib/action_dispatch/middleware/public_exceptions.rb +2 -2
  87. data/lib/action_dispatch/middleware/reloader.rb +14 -58
  88. data/lib/action_dispatch/middleware/remote_ip.rb +29 -19
  89. data/lib/action_dispatch/middleware/request_id.rb +11 -6
  90. data/lib/action_dispatch/middleware/session/abstract_store.rb +23 -11
  91. data/lib/action_dispatch/middleware/session/cache_store.rb +9 -6
  92. data/lib/action_dispatch/middleware/session/cookie_store.rb +30 -24
  93. data/lib/action_dispatch/middleware/session/mem_cache_store.rb +4 -0
  94. data/lib/action_dispatch/middleware/show_exceptions.rb +11 -9
  95. data/lib/action_dispatch/middleware/ssl.rb +124 -36
  96. data/lib/action_dispatch/middleware/stack.rb +44 -40
  97. data/lib/action_dispatch/middleware/static.rb +51 -35
  98. data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +2 -14
  99. data/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
  100. data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +1 -1
  101. data/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +1 -1
  102. data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +4 -4
  103. data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +59 -63
  104. data/lib/action_dispatch/railtie.rb +2 -2
  105. data/lib/action_dispatch/request/session.rb +69 -33
  106. data/lib/action_dispatch/request/utils.rb +51 -19
  107. data/lib/action_dispatch/routing/inspector.rb +32 -43
  108. data/lib/action_dispatch/routing/mapper.rb +515 -348
  109. data/lib/action_dispatch/routing/polymorphic_routes.rb +8 -14
  110. data/lib/action_dispatch/routing/redirection.rb +5 -4
  111. data/lib/action_dispatch/routing/route_set.rb +148 -240
  112. data/lib/action_dispatch/routing/url_for.rb +27 -10
  113. data/lib/action_dispatch/routing.rb +17 -13
  114. data/lib/action_dispatch/testing/assertion_response.rb +45 -0
  115. data/lib/action_dispatch/testing/assertions/response.rb +38 -20
  116. data/lib/action_dispatch/testing/assertions/routing.rb +16 -12
  117. data/lib/action_dispatch/testing/assertions.rb +1 -1
  118. data/lib/action_dispatch/testing/integration.rb +377 -149
  119. data/lib/action_dispatch/testing/request_encoder.rb +53 -0
  120. data/lib/action_dispatch/testing/test_process.rb +24 -20
  121. data/lib/action_dispatch/testing/test_request.rb +22 -31
  122. data/lib/action_dispatch/testing/test_response.rb +12 -4
  123. data/lib/action_dispatch.rb +4 -1
  124. data/lib/action_pack/gem_version.rb +4 -4
  125. data/lib/action_pack.rb +1 -1
  126. metadata +32 -34
  127. data/lib/action_controller/metal/hide_actions.rb +0 -40
  128. data/lib/action_controller/metal/rack_delegation.rb +0 -32
  129. data/lib/action_controller/middleware.rb +0 -39
  130. data/lib/action_controller/model_naming.rb +0 -12
  131. data/lib/action_dispatch/journey/backwards.rb +0 -5
  132. data/lib/action_dispatch/journey/router/strexp.rb +0 -27
  133. data/lib/action_dispatch/testing/assertions/dom.rb +0 -3
  134. data/lib/action_dispatch/testing/assertions/selector.rb +0 -3
  135. data/lib/action_dispatch/testing/assertions/tag.rb +0 -3
  136. /data/lib/action_dispatch/middleware/templates/rescues/{_source.erb → _source.html.erb} +0 -0
data/CHANGELOG.md CHANGED
@@ -1,34 +1,92 @@
1
- ## Rails 4.2.11.3 (May 15, 2020) ##
1
+ ## Rails 5.0.7.2 (March 11, 2019) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 4.2.11.2 (May 15, 2020) ##
6
+ ## Rails 5.0.7.1 (November 27, 2018) ##
7
7
 
8
8
  * No changes.
9
9
 
10
10
 
11
- ## Rails 4.2.11.1 (March 11, 2019) ##
11
+ ## Rails 5.0.7 (March 29, 2018) ##
12
+
13
+ * Remove deprecation on `ActionController::Parameters#to_hash` when the instance is
14
+ permitted.
15
+
16
+ *Edouard Chin*
17
+
18
+
19
+ ## Rails 5.0.6 (September 07, 2017) ##
12
20
 
13
21
  * No changes.
14
22
 
15
23
 
16
- ## Rails 4.2.11 (November 27, 2018) ##
24
+ ## Rails 5.0.6.rc1 (August 24, 2017) ##
17
25
 
18
26
  * No changes.
19
27
 
20
28
 
21
- ## Rails 4.2.10 (September 27, 2017) ##
29
+ ## Rails 5.0.5 (July 31, 2017) ##
22
30
 
23
- * Fix regression in behavior of `normalize_path`.
31
+ * No changes.
24
32
 
25
- In Rails 5 there was a change to ensure the encoding of the original string
26
- in a path was maintained. This was incorrectly backported to Rails 4.2 which
27
- caused a regression.
28
33
 
29
- *Eileen M. Uchitelle*
34
+ ## Rails 5.0.5.rc2 (July 25, 2017) ##
35
+
36
+ * No changes.
37
+
38
+
39
+ ## Rails 5.0.5.rc1 (July 19, 2017) ##
40
+
41
+ * Fallback `ActionController::Parameters#to_s` to `Hash#to_s`.
42
+
43
+ *Kir Shatrov*
30
44
 
31
- ## Rails 4.2.9 (June 26, 2017) ##
45
+
46
+ ## Rails 5.0.4 (June 19, 2017) ##
47
+
48
+ * No changes.
49
+
50
+
51
+ ## Rails 5.0.3 (May 12, 2017) ##
52
+
53
+ * Raise exception when calling `to_h` in an unfiltered Parameters.
54
+
55
+ This method will raise on unfiltered Parameters if
56
+ `config.action_controller.raise_on_unfiltered_parameters` is true.
57
+
58
+ Before we returned either an empty hash or only the always permitted parameters
59
+ (`:controller` and `:action` by default).
60
+
61
+ The previous behavior was dangerous because in order to get the attributes users
62
+ usually fallback to use `to_unsafe_h` that could potentially introduce security issues.
63
+
64
+ *Rafael Mendonça França*
65
+
66
+ * Add `ActionController::Parameters#to_hash` to implicit conversion.
67
+
68
+ Now methods that implicit convert objects to a hash will be able to work without
69
+ requiring the users to change their implementation.
70
+
71
+ This method will return a `Hash` instead of a `ActiveSupport::HashWithIndefirentAccess`
72
+ to mimic the same implementation of `ActiveSupport::HashWithIndefirentAccess#to_hash`.
73
+
74
+ This method will raise on unfiltered Parameters if
75
+ `config.action_controller.raise_on_unfiltered_parameters` is true.
76
+
77
+ *Rafael Mendonça França*
78
+
79
+ * Undeprecate `ActionController::Parameters#to_query` and `#to_param`.
80
+
81
+ Previously it was raising a deprecation because it may be unsafe to use those methods
82
+ in an unfiltered parameter. Now we delegate to `#to_h` that already raise an error when
83
+ the Parameters instance is not permitted.
84
+
85
+ This also fix a bug when using `#to_query` in a hash that contains a
86
+ `ActionController::Parameters` instance and was returning the name of the class in the
87
+ string.
88
+
89
+ *Rafael Mendonça França*
32
90
 
33
91
  * Use more specific check for :format in route path
34
92
 
@@ -56,635 +114,1083 @@
56
114
 
57
115
  *Andrew White*
58
116
 
117
+ * Don't include default headers in `ActionController::Metal` responses
59
118
 
60
- ## Rails 4.2.8 (February 21, 2017) ##
119
+ The commit e16afe6 introduced an unintentional change of behavior where the default
120
+ headers were included in responses from `ActionController::Metai` based controllers.
121
+ This is now reverted to the previous behavior of having no default headers.
61
122
 
62
- * No changes.
123
+ Fixes #25820.
63
124
 
125
+ *Jon Moss*
64
126
 
65
- ## Rails 4.2.7 (July 12, 2016) ##
127
+ * Fix malformed URLS when using `ApplicationController.renderer`
66
128
 
67
- * No changes.
129
+ The Rack environment variable `rack.url_scheme` was not being set so `scheme` was
130
+ returning `nil`. This caused URLs to be malformed with the default settings.
131
+ Fix this by setting `rack.url_scheme` when the environment is normalized.
68
132
 
133
+ Fixes #28151.
69
134
 
70
- ## Rails 4.2.6 (March 07, 2016) ##
135
+ *George Vrettos*
71
136
 
72
- * No changes.
137
+ * Commit flash changes when using a redirect route.
73
138
 
139
+ Fixes #27992.
74
140
 
75
- ## Rails 4.2.5.2 (February 26, 2016) ##
141
+ *Andrew White*
76
142
 
77
- * Do not allow render with unpermitted parameter.
78
143
 
79
- Fixes CVE-2016-2098.
144
+ ## Rails 5.0.2 (March 01, 2017) ##
80
145
 
81
- *Arthur Neves*
146
+ * Make `with_routing` test helper work when testing controllers inheriting from `ActionController::API`.
82
147
 
148
+ *Julia López*
83
149
 
84
- ## Rails 4.2.5.1 (January 25, 2015) ##
85
150
 
86
- * No changes.
151
+ ## Rails 5.0.1 (December 21, 2016) ##
87
152
 
153
+ * Restored correct `charset` behavior on `send_data` and `send_file`: while
154
+ they should pass along any supplied value, they should not add a default.
88
155
 
89
- ## Rails 4.2.5 (November 12, 2015) ##
156
+ Fixes #27344.
90
157
 
91
- * `ActionController::TestCase` can teardown gracefully if an error is raised
92
- early in the `setup` chain.
158
+ *Matthew Draper*
93
159
 
94
- *Yves Senn*
95
160
 
96
- * Parse RSS/ATOM responses as XML, not HTML.
161
+ ## Rails 5.0.1.rc2 (December 10, 2016) ##
97
162
 
98
- *Alexander Kaupanin*
163
+ * Move `cookies`, `flash`, and `session` methods back to
164
+ `ActionDispatch::Integration::Session`.
99
165
 
100
- * Fix regression in mounted engine named routes generation for app deployed to
101
- a subdirectory. `relative_url_root` was prepended to the path twice (e.g.
102
- "/subdir/subdir/engine_path" instead of "/subdir/engine_path")
166
+ *Matthew Draper*
103
167
 
104
- Fixes #20920. Fixes #21459.
168
+ * Do not reset in `ActionDispatch::IntegrationTest#open_session`; doing so
169
+ is incompatible with existing (unintended) API usage.
105
170
 
106
- *Matthew Erhard*
171
+ *Sean Griffin*
107
172
 
108
- * `url_for` does not modify its arguments when generating polymorphic URLs.
109
173
 
110
- *Bernerd Schaefer*
174
+ ## Rails 5.0.1.rc1 (December 01, 2016) ##
111
175
 
112
- * Update `ActionController::TestSession#fetch` to behave more like
113
- `ActionDispatch::Request::Session#fetch` when using non-string keys.
176
+ * Fixed error caused by `force_ssl_redirect` when `session_store` is
177
+ enabled.
114
178
 
115
- *Jeremy Friesen*
179
+ Fixes #19679.
116
180
 
181
+ *Taishi Kasuga*
117
182
 
118
- ## Rails 4.2.4 (August 24, 2015) ##
183
+ * Use accept header in integration tests with `as: :json`
119
184
 
120
- * ActionController::TestSession now accepts a default value as well as
121
- a block for generating a default value based off the key provided.
185
+ Instead of appending the `format` to the request path. Rails will figure
186
+ out the format from the header instead.
122
187
 
123
- This fixes calls to session#fetch in ApplicationController instances that
124
- take more two arguments or a block from raising `ArgumentError: wrong
125
- number of arguments (2 for 1)` when performing controller tests.
188
+ This allows devs to use `:as` on routes that don't have a format.
126
189
 
127
- *Matthew Gerrior*
190
+ Fixes #27144.
128
191
 
129
- * Fix to keep original header instance in `ActionDispatch::SSL`
192
+ *Kasper Timm Hansen*
130
193
 
131
- `ActionDispatch::SSL` changes headers to `Hash`.
132
- So some headers will be broken if there are some middlewares
133
- on `ActionDispatch::SSL` and if it uses `Rack::Utils::HeaderHash`.
194
+ * Fixed integration test requests appending and changing request paths.
134
195
 
135
- *Fumiaki Matsushima*
196
+ #Before
197
+ post "/anything", params: params, headers: headers, as: :json
136
198
 
199
+ "/anything" would be converted to "/anything.json" based on format.
200
+ The path is now maintained and the format is respected based on `:as`
201
+ option.
137
202
 
138
- ## Rails 4.2.3 (June 25, 2015) ##
203
+ Fixes #27144.
139
204
 
140
- * Fix rake routes not showing the right format when
141
- nesting multiple routes.
205
+ * Fixes incorrect output from rails routes when using singular resources.
142
206
 
143
- See #18373.
207
+ Fixes #26606.
144
208
 
145
- *Ravil Bayramgalin*
209
+ *Erick Reyna*
146
210
 
147
- * Fix regression where a gzip file response would have a Content-type,
148
- even when it was a 304 status code.
211
+ * Fixes multiple calls to `logger.fatal` instead of a single call,
212
+ for every line in an exception backtrace, when printing trace
213
+ from `DebugExceptions` middleware.
149
214
 
150
- See #19271.
215
+ Fixes #26134.
151
216
 
152
- *Kohei Suzuki*
217
+ *Vipul A M*
153
218
 
154
- * Fix handling of empty X_FORWARDED_HOST header in raw_host_with_port
219
+ * Add `ActionController::Parameters#merge!`, which behaves the same as `Hash#merge!`.
155
220
 
156
- Previously, an empty X_FORWARDED_HOST header would cause
157
- Actiondispatch::Http:URL.raw_host_with_port to return nil, causing
158
- Actiondispatch::Http:URL.host to raise a NoMethodError.
221
+ *Yuji Yaginuma*
159
222
 
160
- *Adam Forsyth*
223
+ * Added `ActionController::Parameters#deep_dup` which actually creates
224
+ a params copy, instead of refereing to old references in params.
161
225
 
162
- * Fallback to `ENV['RAILS_RELATIVE_URL_ROOT']` in `url_for`.
226
+ Fixes #26566.
163
227
 
164
- Fixed an issue where the `RAILS_RELATIVE_URL_ROOT` environment variable is not
165
- prepended to the path when `url_for` is called. If `SCRIPT_NAME` (used by Rack)
166
- is set, it takes precedence.
228
+ *Pavel Evstigneev*, *Rafael Mendonça França*
167
229
 
168
- Fixes #5122.
230
+ * Make `fixture_file_upload` work in integration tests.
169
231
 
170
- *Yasyf Mohamedali*
232
+ *Yuji Yaginuma*
171
233
 
172
- * Fix regression in functional tests. Responses should have default headers
173
- assigned.
234
+ * Add `to_param` to `ActionController::Parameters` deprecations.
174
235
 
175
- See #18423.
236
+ In the future `ActionController::Parameters` are discouraged from being used
237
+ in URLs without explicit whitelisting. Go through `to_h` to use `to_param`.
176
238
 
177
- *Jeremy Kemper*, *Yves Senn*
239
+ *Kir Shatrov*
178
240
 
241
+ * Fix nested multiple roots
179
242
 
180
- ## Rails 4.2.2 (June 16, 2015) ##
243
+ The PR #20940 enabled the use of multiple roots with different constraints
244
+ at the top level but unfortunately didn't work when those roots were inside
245
+ a namespace and also broke the use of root inside a namespace after a top
246
+ level root was defined because the check for the existence of the named route
247
+ used the global :root name and not the namespaced name.
181
248
 
182
- * No Changes *
249
+ This is fixed by using the name_for_action method to expand the :root name to
250
+ the full namespaced name. We can pass nil for the second argument as we're not
251
+ dealing with resource definitions so don't need to handle the cases for edit
252
+ and new routes.
183
253
 
254
+ Fixes #26148.
184
255
 
185
- ## Rails 4.2.1 (March 19, 2015) ##
256
+ *Ryo Hashimoto*, *Andrew White*
186
257
 
187
- * Non-string authenticity tokens do not raise NoMethodError when decoding
188
- the masked token.
258
+ * SSL: Changes redirect behavior for all non-GET and non-HEAD requests
259
+ (like POST/PUT/PATCH etc) to `http://` resources to redirect to `https://`
260
+ with a [307 status code](http://tools.ietf.org/html/rfc7231#section-6.4.7) instead of [301 status code](http://tools.ietf.org/html/rfc7231#section-6.4.2).
189
261
 
190
- *Ville Lautanala*
262
+ 307 status code instructs the HTTP clients to preserve the original
263
+ request method while redirecting. It has been part of HTTP RFC since
264
+ 1999 and is implemented/recognized by most (if not all) user agents.
191
265
 
192
- * Explicitly ignored wildcard verbs when searching for HEAD routes before fallback
266
+ # Before
267
+ POST http://example.com/articles (i.e. ArticlesContoller#create)
268
+ redirects to
269
+ GET https://example.com/articles (i.e. ArticlesContoller#index)
193
270
 
194
- Fixes an issue where a mounted rack app at root would intercept the HEAD
195
- request causing an incorrect behavior during the fall back to GET requests.
271
+ # After
272
+ POST http://example.com/articles (i.e. ArticlesContoller#create)
273
+ redirects to
274
+ POST https://example.com/articles (i.e. ArticlesContoller#create)
275
+
276
+ *Chirag Singhal*
277
+
278
+ * Add `:as` option to `ActionController:TestCase#process` and related methods.
279
+
280
+ Specifying `as: mime_type` allows the `CONTENT_TYPE` header to be specified
281
+ in controller tests without manually doing this through `@request.headers['CONTENT_TYPE']`.
282
+
283
+ *Everest Stefan Munro-Zeisberger*
284
+
285
+ * Prevent autoload from deadlocking while ActionController::Live is streaming.
286
+
287
+ *Alex Chinn*
288
+
289
+ * Don't override the `Accept` header in integration tests when called with `xhr: true`.
290
+
291
+ Fixes #25859.
292
+
293
+ *David Chen*
294
+
295
+ * Reset a new session directly after its creation in `ActionDispatch::IntegrationTest#open_session`.
296
+
297
+ Fixes #22742.
298
+
299
+ *Tawan Sierek*
300
+
301
+ * Fix 'defaults' option for root route.
302
+
303
+ A regression from some refactoring for the 5.0 release, this change
304
+ fixes the use of 'defaults' (default parameters) in the 'root' routing method.
305
+
306
+ *Chris Arcand*
307
+
308
+ * Check `request.path_parameters` encoding at the point they're set.
309
+
310
+ Check for any non-UTF8 characters in path parameters at the point they're
311
+ set in `env`. Previously they were checked for when used to get a controller
312
+ class, but this meant routes that went directly to a Rack app, or skipped
313
+ controller instantiation for some other reason, had to defend against
314
+ non-UTF8 characters themselves.
315
+
316
+ *Grey Baker*
317
+
318
+ * Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static
319
+
320
+ Pass `Rack::Request` objects to `ActionDispatch::FileHandler` to avoid it
321
+ raising `ActionController::UnknownHttpMethod`. If an unknown method is
322
+ passed, it should exception higher in the stack instead, once we've had a
323
+ chance to define exception handling behaviour.
324
+
325
+ *Grey Baker*
326
+
327
+ * Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`
328
+
329
+ Updated `ActionDispatch::ExceptionWrapper` to handle the Rack 2.0 namespace
330
+ for `ParameterTypeError` and `InvalidParameterError` errors.
331
+
332
+ *Grey Baker*
333
+
334
+ * Deprecated omitting the route path.
335
+ Specify the path with a String or a Symbol instead.
336
+
337
+ # Before
338
+ get action: :show, as: :show
339
+ # After
340
+ get "", action: :show, as: :show
341
+
342
+ *Volmer*
343
+
344
+ * Added new `ActionDispatch::DebugLocks` middleware that can be used
345
+ to diagnose deadlocks in the autoload interlock.
346
+ To use it, insert it near the top of the middleware stack, using
347
+ `config/application.rb`:
348
+
349
+ config.middleware.insert_before Rack::Sendfile, ActionDispatch::DebugLocks
350
+
351
+ After adding, visiting `/rails/locks` will show a summary of all
352
+ threads currently known to the interlock.
353
+
354
+ *Matthew Draper*
355
+
356
+ * Fix request encoding in Integration tests when string literals are
357
+ frozen using `--enable-frozen-string-literal` or `# frozen_string_literal: true`.
358
+
359
+ *Volmer*
360
+
361
+ * Since long keys are truncated when passed to ciphers, Ruby 2.4
362
+ doesn't accept keys greater than their max length.
363
+ Fixed default key length on cipher for `ActiveSupport::MessageEncryptor`,
364
+ which was causing errors on Ruby 2.4.
365
+
366
+ *Vipul A M*
367
+
368
+ * Fixed adding implicitly rendered template digests to ETags.
369
+ Properly ignore implicit template cache option to ETag, if `template: false`
370
+ is passed when rendering.
371
+
372
+ *Javan Makhmali*
373
+
374
+
375
+ ## Rails 5.0.0 (June 30, 2016) ##
376
+
377
+ * Add `ActionController#helpers` to get access to the view context at the controller
378
+ level.
379
+
380
+ *Rafael Mendonça França*
381
+
382
+ * Routing: Refactor `:action` default handling to ensure that path
383
+ parameters are not mutated during route generation.
384
+
385
+ *Andrew White*
386
+
387
+ * Add extension synonyms `yml` and `yaml` for MIME type `application/x-yaml`.
388
+
389
+ *bogdanvlviv*
390
+
391
+ * Adds support for including ActionController::Cookies in API controllers.
392
+ Previously, including the module would raise when trying to define
393
+ a `cookies` helper method. Skip calling #helper_method if it is not
394
+ defined -- if we don't have helpers, we needn't define one.
395
+
396
+ Fixes #24304
397
+
398
+ *Ryan T. Hosford*
399
+
400
+ * ETags: Introduce `Response#strong_etag=` and `#weak_etag=` and analogous
401
+ options for `fresh_when` and `stale?`. `Response#etag=` sets a weak ETag.
402
+
403
+ Strong ETags are desirable when you're serving byte-for-byte identical
404
+ responses that support Range requests, like PDFs or videos (typically
405
+ done by reproxying the response from a backend storage service).
406
+ Also desirable when fronted by some CDNs that support strong ETags
407
+ only, like Akamai.
408
+
409
+ *Jeremy Daer*
410
+
411
+ * ETags: No longer strips quotes (") from ETag values before comparing them.
412
+ Quotes are significant, part of the ETag. A quoted ETag and an unquoted
413
+ one are not the same entity.
414
+
415
+ *Jeremy Daer*
416
+
417
+ * ETags: Support `If-None-Match: *`. Rarely useful for GET requests; meant
418
+ to provide some optimistic concurrency control for PUT requests.
419
+
420
+ *Jeremy Daer*
421
+
422
+ * `ActionDispatch::ParamsParser` is deprecated and was removed from the middleware
423
+ stack. To configure the parameter parsers use `ActionDispatch::Request.parameter_parsers=`.
424
+
425
+ *tenderlove*
426
+
427
+ * When a `respond_to` collector with a block doesn't have a response, then
428
+ a `:no_content` response should be rendered. This brings the default
429
+ rendering behavior introduced by https://github.com/rails/rails/issues/19036
430
+ to controller methods employing `respond_to`.
431
+
432
+ *Justin Coyne*
433
+
434
+ * Add `ActionController::Parameters#dig` on Ruby 2.3 and greater, which
435
+ behaves the same as `Hash#dig`.
436
+
437
+ *Sean Griffin*
438
+
439
+ * Add request headers in the payload of the `start_processing.action_controller`
440
+ and `process_action.action_controller` notifications.
441
+
442
+ *Gareth du Plooy*
443
+
444
+ * Add `action_dispatch_integration_test` load hook. The hook can be used to
445
+ extend `ActionDispatch::IntegrationTest` once it has been loaded.
446
+
447
+ *Yuichiro Kaneko*
448
+
449
+ * Update default rendering policies when the controller action did
450
+ not explicitly indicate a response.
451
+
452
+ For API controllers, the implicit render always renders "204 No Content"
453
+ and does not account for any templates.
454
+
455
+ For other controllers, the following conditions are checked:
456
+
457
+ First, if a template exists for the controller action, it is rendered.
458
+ This template lookup takes into account the action name, locales, format,
459
+ variant, template handlers, etc. (see `render` for details).
460
+
461
+ Second, if other templates exist for the controller action but is not in
462
+ the right format (or variant, etc.), an `ActionController::UnknownFormat`
463
+ is raised. The list of available templates is assumed to be a complete
464
+ enumeration of all the possible formats (or variants, etc.); that is,
465
+ having only HTML and JSON templates indicate that the controller action is
466
+ not meant to handle XML requests.
467
+
468
+ Third, if the current request is an "interactive" browser request (the user
469
+ navigated here by entering the URL in the address bar, submitting a form,
470
+ clicking on a link, etc. as opposed to an XHR or non-browser API request),
471
+ `ActionView::UnknownFormat` is raised to display a helpful error
472
+ message.
473
+
474
+ Finally, it falls back to the same "204 No Content" behavior as API controllers.
475
+
476
+ *Godfrey Chan*, *Jon Moss*, *Kasper Timm Hansen*, *Mike Clark*, *Matthew Draper*
477
+
478
+ * Add "application/gzip" as a default mime type.
479
+
480
+ *Mehmet Emin İNAÇ*
481
+
482
+ * Add request encoding and response parsing to integration tests.
483
+
484
+ What previously was:
196
485
 
197
- Example:
198
486
  ```ruby
199
- draw do
200
- get '/home' => 'test#index'
201
- mount rack_app, at: '/'
487
+ require 'test_helper'
488
+
489
+ class ApiTest < ActionDispatch::IntegrationTest
490
+ test 'creates articles' do
491
+ assert_difference -> { Article.count } do
492
+ post articles_path(format: :json),
493
+ params: { article: { title: 'Ahoy!' } }.to_json,
494
+ headers: { 'Content-Type' => 'application/json' }
495
+ end
496
+
497
+ assert_equal({ 'id' => Article.last.id, 'title' => 'Ahoy!' }, JSON.parse(response.body))
498
+ end
202
499
  end
203
- head '/home'
204
- assert_response :success
205
500
  ```
206
- In this case, a HEAD request runs through the routes the first time and fails
207
- to match anything. Then, it runs through the list with the fallback and matches
208
- `get '/home'`. The original behavior would match the rack app in the first pass.
209
501
 
210
- *Terence Sun*
502
+ Can now be written as:
211
503
 
212
- * Preserve default format when generating URLs
504
+ ```ruby
505
+ require 'test_helper'
213
506
 
214
- Fixes an issue that would cause the format set in default_url_options to be
215
- lost when generating URLs with fewer positional arguments than parameters in
216
- the route definition.
507
+ class ApiTest < ActionDispatch::IntegrationTest
508
+ test 'creates articles' do
509
+ assert_difference -> { Article.count } do
510
+ post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json
511
+ end
217
512
 
218
- Backport of #18627
513
+ assert_equal({ 'id' => Article.last.id, 'title' => 'Ahoy!' }, response.parsed_body)
514
+ end
515
+ end
516
+ ```
219
517
 
220
- *Tekin Suleyman*, *Dominic Baggott*
518
+ Passing `as: :json` to integration test request helpers will set the format,
519
+ content type and encode the parameters as JSON.
221
520
 
222
- * Default headers, removed in controller actions, are no longer reapplied on
223
- the test response.
521
+ Then on the response side, `parsed_body` will parse the body according to the
522
+ content type the response has.
224
523
 
225
- *Jonas Baumann*
524
+ Currently JSON is the only supported MIME type. Add your own with
525
+ `ActionDispatch::IntegrationTest.register_encoder`.
226
526
 
227
- * Ensure `append_info_to_payload` is called even if an exception is raised.
527
+ *Kasper Timm Hansen*
228
528
 
229
- Fixes an issue where when an exception is raised in the request the additonal
230
- payload data is not available.
529
+ * Add "image/svg+xml" as a default mime type.
231
530
 
232
- See:
233
- * #14903
234
- * https://github.com/roidrage/lograge/issues/37
531
+ *DHH*
235
532
 
236
- *Dieter Komendera*, *Margus Pärt*
533
+ * Add `-g` and `-c` options to `bin/rails routes`. These options return the url `name`, `verb` and
534
+ `path` field that match the pattern or match a specific controller.
237
535
 
238
- * Correctly rely on the response's status code to handle calls to `head`.
536
+ Deprecate `CONTROLLER` env variable in `bin/rails routes`.
239
537
 
240
- *Robin Dupret*
538
+ See #18902.
241
539
 
242
- * Using `head` method returns empty response_body instead
243
- of returning a single space " ".
540
+ *Anton Davydov*, *Vipul A M*
244
541
 
245
- The old behavior was added as a workaround for a bug in an early
246
- version of Safari, where the HTTP headers are not returned correctly
247
- if the response body has a 0-length. This is been fixed since and
248
- the workaround is no longer necessary.
542
+ * Response etags to always be weak: Prefixes 'W/' to value returned by
543
+ `ActionDispatch::Http::Cache::Response#etag=`, such that etags set in
544
+ `fresh_when` and `stale?` are weak.
249
545
 
250
- Fixes #18253.
546
+ Fixes #17556.
251
547
 
252
- *Prathamesh Sonpatki*
548
+ *Abhishek Yadav*
253
549
 
254
- * Fix how polymorphic routes works with objects that implement `to_model`.
550
+ * Provide the name of HTTP Status code in assertions.
255
551
 
256
- *Travis Grathwell*
552
+ *Sean Collins*
257
553
 
258
- * Fixed handling of positional url helper arguments when `format: false`.
554
+ * More explicit error message when running `rake routes`. `CONTROLLER` argument
555
+ can now be supplied in different ways:
556
+ `Rails::WelcomeController`, `Rails::Welcome`, `rails/welcome`.
259
557
 
260
- Fixes #17819.
558
+ Fixes #22918.
261
559
 
262
- *Andrew White*, *Tatiana Soukiassian*
560
+ *Edouard Chin*
263
561
 
264
- * Fixed usage of optional scopes in URL helpers.
562
+ * Allow `ActionController::Parameters` instances as an argument to URL
563
+ helper methods. An `ArgumentError` will be raised if the passed parameters
564
+ are not secure.
265
565
 
266
- *Alex Robbin*
566
+ Fixes #22832.
267
567
 
568
+ *Prathamesh Sonpatki*
268
569
 
269
- ## Rails 4.2.0 (December 20, 2014) ##
570
+ * Add option for per-form CSRF tokens.
270
571
 
271
- * Add `ActionController::Parameters#to_unsafe_h` to return an unfiltered
272
- `Hash` representation of Parameters object. This is now a preferred way to
273
- retrieve unfiltered parameters as we will stop inheriting `AC::Parameters`
274
- object in Rails 5.0.
572
+ *Greg Ose*, *Ben Toews*
275
573
 
276
- *Prem Sichanugrist*
574
+ * Fix `ActionController::Parameters#convert_parameters_to_hashes` to return filtered
575
+ or unfiltered values based on from where it is called, `to_h` or `to_unsafe_h`
576
+ respectively.
277
577
 
278
- * Restore handling of a bare `Authorization` header, without `token=`
279
- prefix.
578
+ Fixes #22841.
280
579
 
281
- Fixes #17108.
580
+ *Prathamesh Sonpatki*
282
581
 
283
- *Guo Xiang Tan*
582
+ * Add `ActionController::Parameters#include?`
284
583
 
285
- * Deprecate use of string keys in URL helpers.
584
+ *Justin Coyne*
286
585
 
287
- Use symbols instead.
288
- Fixes #16958.
586
+ * Deprecate `redirect_to :back` in favor of `redirect_back`, which accepts a
587
+ required `fallback_location` argument, thus eliminating the possibility of a
588
+ `RedirectBackError`.
289
589
 
290
- *Byron Bischoff*, *Melanie Gilman*
590
+ *Derek Prior*
291
591
 
292
- * Deprecate the `only_path` option on `*_path` helpers.
592
+ * Add `redirect_back` method to `ActionController::Redirecting` to provide a
593
+ way to safely redirect to the `HTTP_REFERER` if it is present, falling back
594
+ to a provided redirect otherwise.
293
595
 
294
- In cases where this option is set to `true`, the option is redundant and can
295
- be safely removed; otherwise, the corresponding `*_url` helper should be
296
- used instead.
596
+ *Derek Prior*
297
597
 
298
- Fixes #17294.
598
+ * `ActionController::TestCase` will be moved to its own gem in Rails 5.1.
299
599
 
300
- *Dan Olson*, *Godfrey Chan*
600
+ With the speed improvements made to `ActionDispatch::IntegrationTest` we no
601
+ longer need to keep two separate code bases for testing controllers. In
602
+ Rails 5.1 `ActionController::TestCase` will be deprecated and moved into a
603
+ gem outside of Rails source.
301
604
 
302
- * Improve Journey compliance to RFC 3986.
605
+ This is a documentation deprecation so that going forward new tests will use
606
+ `ActionDispatch::IntegrationTest` instead of `ActionController::TestCase`.
303
607
 
304
- The scanner in Journey failed to recognize routes that use literals
305
- from the sub-delims section of RFC 3986. It's now able to parse those
306
- authorized delimiters and route as expected.
608
+ *Eileen M. Uchitelle*
307
609
 
308
- Fixes #17212.
610
+ * Add a `response_format` option to `ActionDispatch::DebugExceptions`
611
+ to configure the format of the response when errors occur in
612
+ development mode.
309
613
 
310
- *Nicolas Cavigneaux*
614
+ If `response_format` is `:default` the debug info will be rendered
615
+ in an HTML page. In the other hand, if the provided value is `:api`
616
+ the debug info will be rendered in the original response format.
311
617
 
312
- * Deprecate implicit Array conversion for Response objects. It was added
313
- (using `#to_ary`) so we could conveniently use implicit splatting:
618
+ *Jorge Bejar*
314
619
 
315
- status, headers, body = response
620
+ * Change the `protect_from_forgery` prepend default to `false`.
316
621
 
317
- But it also means `response + response` works and `[response].flatten`
318
- cascades down to the Rack body. Nonsense behavior. Instead, rely on
319
- explicit conversion and splatting with `#to_a`:
622
+ Per this comment
623
+ https://github.com/rails/rails/pull/18334#issuecomment-69234050 we want
624
+ `protect_from_forgery` to default to `prepend: false`.
320
625
 
321
- status, header, body = *response
626
+ `protect_from_forgery` will now be inserted into the callback chain at the
627
+ point it is called in your application. This is useful for cases where you
628
+ want to `protect_from_forgery` after you perform required authentication
629
+ callbacks or other callbacks that are required to run after forgery protection.
322
630
 
323
- *Jeremy Kemper*
631
+ If you want `protect_from_forgery` callbacks to always run first, regardless of
632
+ position they are called in your application then you can add `prepend: true`
633
+ to your `protect_from_forgery` call.
324
634
 
325
- * Don't rescue `IPAddr::InvalidAddressError`.
635
+ Example:
326
636
 
327
- `IPAddr::InvalidAddressError` does not exist in Ruby 1.9.3
328
- and fails for JRuby in 1.9 mode.
637
+ ```ruby
638
+ protect_from_forgery prepend: true
639
+ ```
640
+
641
+ *Eileen M. Uchitelle*
329
642
 
330
- *Peter Suschlik*
643
+ * In url_for, never append a question mark to the URL when the query string
644
+ is empty anyway. (It used to do that when called like `url_for(controller:
645
+ 'x', action: 'y', q: {})`.)
331
646
 
332
- * Fix bug where the router would ignore any constraints added to redirect
333
- routes.
647
+ *Paul Grayson*
334
648
 
335
- Fixes #16605.
649
+ * Catch invalid UTF-8 querystring values and respond with BadRequest
650
+
651
+ Check querystring params for invalid UTF-8 characters, and raise an
652
+ ActionController::BadRequest error if present. Previously these strings
653
+ would typically trigger errors further down the stack.
654
+
655
+ *Grey Baker*
656
+
657
+ * Parse RSS/ATOM responses as XML, not HTML.
658
+
659
+ *Alexander Kaupanin*
660
+
661
+ * Show helpful message in `BadRequest` exceptions due to invalid path
662
+ parameter encodings.
663
+
664
+ Fixes #21923.
336
665
 
337
666
  *Agis Anastasopoulos*
338
667
 
339
- * Allow `config.action_dispatch.trusted_proxies` to accept an IPAddr object.
668
+ * Add the ability of returning arbitrary headers to `ActionDispatch::Static`.
669
+
670
+ Now ActionDispatch::Static can accept HTTP headers so that developers
671
+ will have control of returning arbitrary headers like
672
+ 'Access-Control-Allow-Origin' when a response is delivered. They can be
673
+ configured with `#config`:
340
674
 
341
675
  Example:
342
676
 
343
- # config/environments/production.rb
344
- config.action_dispatch.trusted_proxies = IPAddr.new('4.8.15.0/16')
677
+ config.public_file_server.headers = {
678
+ "Cache-Control" => "public, max-age=60",
679
+ "Access-Control-Allow-Origin" => "http://rubyonrails.org"
680
+ }
681
+
682
+ *Yuki Nishijima*
345
683
 
346
- *Sam Aarons*
684
+ * Allow multiple `root` routes in same scope level. Example:
347
685
 
348
- * Avoid duplicating routes for HEAD requests.
686
+ Example:
349
687
 
350
- Instead of duplicating the routes, we will first match the HEAD request to
351
- HEAD routes. If no match is found, we will then map the HEAD request to
352
- GET routes.
688
+ root 'blog#show', constraints: ->(req) { Hostname.blog_site?(req.host) }
689
+ root 'landing#show'
353
690
 
354
- *Guo Xiang Tan*, *Andrew White*
691
+ *Rafael Sales*
355
692
 
356
- * Requests that hit `ActionDispatch::Static` can now take advantage
357
- of gzipped assets on disk. By default a gzip asset will be served if
358
- the client supports gzip and a compressed file is on disk.
693
+ * Fix regression in mounted engine named routes generation for app deployed to
694
+ a subdirectory. `relative_url_root` was prepended to the path twice (e.g.
695
+ "/subdir/subdir/engine_path" instead of "/subdir/engine_path")
359
696
 
360
- *Richard Schneeman*
697
+ Fixes #20920. Fixes #21459.
361
698
 
362
- * `ActionController::Parameters` will stop inheriting from `Hash` and
363
- `HashWithIndifferentAccess` in the next major release. If you use any method
364
- that is not available on `ActionController::Parameters` you should consider
365
- calling `#to_h` to convert it to a `Hash` first before calling that method.
699
+ *Matthew Erhard*
366
700
 
367
- *Prem Sichanugrist*
701
+ * `ActionDispatch::Response#new` no longer applies default headers. If you want
702
+ default headers applied to the response object, then call
703
+ `ActionDispatch::Response.create`. This change only impacts people who are
704
+ directly constructing an `ActionDispatch::Response` object.
368
705
 
369
- * `ActionController::Parameters#to_h` now returns a `Hash` with unpermitted
370
- keys removed. This change is to reflect on a security concern where some
371
- method performed on an `ActionController::Parameters` may yield a `Hash`
372
- object which does not maintain `permitted?` status. If you would like to
373
- get a `Hash` with all the keys intact, duplicate and mark it as permitted
374
- before calling `#to_h`.
706
+ * Accessing mime types via constants like `Mime::HTML` is deprecated. Please
707
+ change code like this:
375
708
 
376
- params = ActionController::Parameters.new({
377
- name: 'Senjougahara Hitagi',
378
- oddity: 'Heavy stone crab'
379
- })
380
- params.to_h
381
- # => {}
709
+ Mime::HTML
382
710
 
383
- unsafe_params = params.dup.permit!
384
- unsafe_params.to_h
385
- # => {"name"=>"Senjougahara Hitagi", "oddity"=>"Heavy stone crab"}
711
+ To this:
386
712
 
387
- safe_params = params.permit(:name)
388
- safe_params.to_h
389
- # => {"name"=>"Senjougahara Hitagi"}
713
+ Mime[:html]
390
714
 
391
- This change is consider a stopgap as we cannot change the code to stop
392
- `ActionController::Parameters` to inherit from `HashWithIndifferentAccess`
393
- in the next minor release.
715
+ This change is so that Rails will not manage a list of constants, and fixes
716
+ an issue where if a type isn't registered you could possibly get the wrong
717
+ object.
394
718
 
395
- *Prem Sichanugrist*
719
+ `Mime[:html]` is available in older versions of Rails, too, so you can
720
+ safely change libraries and plugins and maintain compatibility with
721
+ multiple versions of Rails.
396
722
 
397
- * Deprecated `TagAssertions`.
723
+ * `url_for` does not modify its arguments when generating polymorphic URLs.
398
724
 
399
- *Kasper Timm Hansen*
725
+ *Bernerd Schaefer*
400
726
 
401
- * Use the Active Support JSON encoder for cookie jars using the `:json` or
402
- `:hybrid` serializer. This allows you to serialize custom Ruby objects into
403
- cookies by defining the `#as_json` hook on such objects.
727
+ * Make it easier to opt in to `config.force_ssl` and `config.ssl_options` by
728
+ making them less dangerous to try and easier to disable.
729
+
730
+ SSL redirect:
731
+ * Move `:host` and `:port` options within `redirect: { … }`. Deprecate.
732
+ * Introduce `:status` and `:body` to customize the redirect response.
733
+ The 301 permanent default makes it difficult to test the redirect and
734
+ back out of it since browsers remember the 301. Test with a 302 or 307
735
+ instead, then switch to 301 once you're confident that all is well.
736
+
737
+ HTTP Strict Transport Security (HSTS):
738
+ * Shorter max-age. Shorten the default max-age from 1 year to 180 days,
739
+ the low end for https://www.ssllabs.com/ssltest/ grading and greater
740
+ than the 18-week minimum to qualify for browser preload lists.
741
+ * Disabling HSTS. Setting `hsts: false` now sets `hsts { expires: 0 }`
742
+ instead of omitting the header. Omitting does nothing to disable HSTS
743
+ since browsers hang on to your previous settings until they expire.
744
+ Sending `{ hsts: { expires: 0 }}` flushes out old browser settings and
745
+ actually disables HSTS:
746
+ http://tools.ietf.org/html/rfc6797#section-6.1.1
747
+ * HSTS Preload. Introduce `preload: true` to set the `preload` flag,
748
+ indicating that your site may be included in browser preload lists,
749
+ including Chrome, Firefox, Safari, IE11, and Edge. Submit your site:
750
+ https://hstspreload.appspot.com
751
+
752
+ *Jeremy Daer*
404
753
 
405
- Fixes #16520.
754
+ * Update `ActionController::TestSession#fetch` to behave more like
755
+ `ActionDispatch::Request::Session#fetch` when using non-string keys.
756
+
757
+ *Jeremy Friesen*
406
758
 
407
- *Godfrey Chan*
759
+ * Using strings or symbols for middleware class names is deprecated. Convert
760
+ things like this:
408
761
 
409
- * Add `config.action_dispatch.cookies_digest` option for setting custom
410
- digest. The default remains the same - 'SHA1'.
762
+ middleware.use "Foo::Bar"
411
763
 
412
- *Łukasz Strzałkowski*
764
+ to this:
413
765
 
414
- * Move `respond_with` (and the class-level `respond_to`) to
415
- the `responders` gem.
766
+ middleware.use Foo::Bar
416
767
 
417
- *José Valim*
768
+ * `ActionController::TestSession` now accepts a default value as well as
769
+ a block for generating a default value based off the key provided.
418
770
 
419
- * When your templates change, browser caches bust automatically.
771
+ This fixes calls to `session#fetch` in `ApplicationController` instances that
772
+ take more two arguments or a block from raising `ArgumentError: wrong
773
+ number of arguments (2 for 1)` when performing controller tests.
420
774
 
421
- New default: the template digest is automatically included in your ETags.
422
- When you call `fresh_when @post`, the digest for `posts/show.html.erb`
423
- is mixed in so future changes to the HTML will blow HTTP caches for you.
424
- This makes it easy to HTTP-cache many more of your actions.
775
+ *Matthew Gerrior*
425
776
 
426
- If you render a different template, you can now pass the `:template`
427
- option to include its digest instead:
777
+ * Fix `ActionController::Parameters#fetch` overwriting `KeyError` returned by
778
+ default block.
428
779
 
429
- fresh_when @post, template: 'widgets/show'
780
+ *Jonas Schuber Erlandsson*, *Roque Pinel*
430
781
 
431
- Pass `template: false` to skip the lookup. To turn this off entirely, set:
782
+ * `ActionController::Parameters` no longer inherits from
783
+ `HashWithIndifferentAccess`
432
784
 
433
- config.action_controller.etag_with_template_digest = false
785
+ Inheriting from `HashWithIndifferentAccess` allowed users to call any
786
+ enumerable methods on `Parameters` object, resulting in a risk of losing the
787
+ `permitted?` status or even getting back a pure `Hash` object instead of
788
+ a `Parameters` object with proper sanitization.
434
789
 
435
- *Jeremy Kemper*
790
+ By not inheriting from `HashWithIndifferentAccess`, we are able to make
791
+ sure that all methods that are defined in `Parameters` object will return
792
+ a proper `Parameters` object with a correct `permitted?` flag.
436
793
 
437
- * Remove deprecated `AbstractController::Helpers::ClassMethods::MissingHelperError`
438
- in favor of `AbstractController::Helpers::MissingHelperError`.
794
+ *Prem Sichanugrist*
439
795
 
440
- *Yves Senn*
796
+ * Replaced `ActiveSupport::Concurrency::Latch` with `Concurrent::CountDownLatch`
797
+ from the concurrent-ruby gem.
441
798
 
442
- * Fix `assert_template` not being able to assert that no files were rendered.
799
+ *Jerry D'Antonio*
443
800
 
444
- *Guo Xiang Tan*
801
+ * Add ability to filter parameters based on parent keys.
445
802
 
446
- * Extract source code for the entire exception stack trace for
447
- better debugging and diagnosis.
803
+ # matches {credit_card: {code: "xxxx"}}
804
+ # doesn't match {file: { code: "xxxx"}}
805
+ config.filter_parameters += [ "credit_card.code" ]
448
806
 
449
- *Ryan Dao*
807
+ See #13897.
450
808
 
451
- * Allows ActionDispatch::Request::LOCALHOST to match any IPv4 127.0.0.0/8
452
- loopback address.
809
+ *Guillaume Malette*
453
810
 
454
- *Earl St Sauver*, *Sven Riedel*
811
+ * Deprecate passing first parameter as `Hash` and default status code for `head` method.
455
812
 
456
- * Preserve original path in `ShowExceptions` middleware by stashing it as
457
- `env["action_dispatch.original_path"]`
813
+ *Mehmet Emin İNAÇ*
458
814
 
459
- `ActionDispatch::ShowExceptions` overwrites `PATH_INFO` with the status code
460
- for the exception defined in `ExceptionWrapper`, so the path
461
- the user was visiting when an exception occurred was not previously
462
- available to any custom exceptions_app. The original `PATH_INFO` is now
463
- stashed in `env["action_dispatch.original_path"]`.
815
+ * Adds`Rack::Utils::ParameterTypeError` and `Rack::Utils::InvalidParameterError`
816
+ to the rescue_responses hash in `ExceptionWrapper` (Rack recommends
817
+ integrators serve 400s for both of these).
464
818
 
465
819
  *Grey Baker*
466
820
 
467
- * Use `String#bytesize` instead of `String#size` when checking for cookie
468
- overflow.
821
+ * Add support for API only apps.
822
+ `ActionController::API` is added as a replacement of
823
+ `ActionController::Base` for this kind of applications.
469
824
 
470
- *Agis Anastasopoulos*
825
+ *Santiago Pastorino*, *Jorge Bejar*
471
826
 
472
- * `render nothing: true` or rendering a `nil` body no longer add a single
473
- space to the response body.
827
+ * Remove `assigns` and `assert_template`. Both methods have been extracted
828
+ into a gem at https://github.com/rails/rails-controller-testing.
474
829
 
475
- The old behavior was added as a workaround for a bug in an early version of
476
- Safari, where the HTTP headers are not returned correctly if the response
477
- body has a 0-length. This is been fixed since and the workaround is no
478
- longer necessary.
830
+ See #18950.
479
831
 
480
- Use `render body: ' '` if the old behavior is desired.
832
+ *Alan Guo Xiang Tan*
481
833
 
482
- See #14883 for details.
834
+ * `FileHandler` and `Static` middleware initializers accept `index` argument
835
+ to configure the directory index file name. Defaults to `index` (as in
836
+ `index.html`).
483
837
 
484
- *Godfrey Chan*
838
+ See #20017.
485
839
 
486
- * Prepend a JS comment to JSONP callbacks. Addresses CVE-2014-4671
487
- ("Rosetta Flash").
840
+ *Eliot Sykes*
488
841
 
489
- *Greg Campbell*
842
+ * Deprecate `:nothing` option for `render` method.
490
843
 
491
- * Because URI paths may contain non US-ASCII characters we need to force
492
- the encoding of any unescaped URIs to UTF-8 if they are US-ASCII.
493
- This essentially replicates the functionality of the monkey patch to
494
- URI.parser.unescape in active_support/core_ext/uri.rb.
844
+ *Mehmet Emin İNAÇ*
495
845
 
496
- Fixes #16104.
846
+ * Fix `rake routes` not showing the right format when
847
+ nesting multiple routes.
497
848
 
498
- *Karl Entwistle*
849
+ See #18373.
499
850
 
500
- * Generate shallow paths for all children of shallow resources.
851
+ *Ravil Bayramgalin*
501
852
 
502
- Fixes #15783.
853
+ * Add ability to override default form builder for a controller.
503
854
 
504
- *Seb Jacobs*
855
+ class AdminController < ApplicationController
856
+ default_form_builder AdminFormBuilder
857
+ end
505
858
 
506
- * JSONP responses are now rendered with the `text/javascript` content type
507
- when rendering through a `respond_to` block.
859
+ *Kevin McPhillips*
508
860
 
509
- Fixes #15081.
861
+ * For actions with no corresponding templates, render `head :no_content`
862
+ instead of raising an error. This allows for slimmer API controller
863
+ methods that simply work, without needing further instructions.
510
864
 
511
- *Lucas Mazza*
865
+ See #19036.
512
866
 
513
- * Add `config.action_controller.always_permitted_parameters` to configure which
514
- parameters are permitted globally. The default value of this configuration is
515
- `['controller', 'action']`.
867
+ *Stephen Bussey*
516
868
 
517
- *Gary S. Weaver*, *Rafael Chacon*
869
+ * Provide friendlier access to request variants.
518
870
 
519
- * Fix env['PATH_INFO'] missing leading slash when a rack app mounted at '/'.
871
+ request.variant = :phone
872
+ request.variant.phone? # true
873
+ request.variant.tablet? # false
520
874
 
521
- Fixes #15511.
875
+ request.variant = [:phone, :tablet]
876
+ request.variant.phone? # true
877
+ request.variant.desktop? # false
878
+ request.variant.any?(:phone, :desktop) # true
879
+ request.variant.any?(:desktop, :watch) # false
522
880
 
523
- *Larry Lv*
881
+ *George Claghorn*
524
882
 
525
- * ActionController::Parameters#require now accepts `false` values.
883
+ * Fix regression where a gzip file response would have a Content-type,
884
+ even when it was a 304 status code.
526
885
 
527
- Fixes #15685.
886
+ See #19271.
528
887
 
529
- *Sergio Romano*
888
+ *Kohei Suzuki*
530
889
 
531
- * With authorization header `Authorization: Token token=`, `authenticate` now
532
- recognize token as nil, instead of "token".
890
+ * Fix handling of empty `X_FORWARDED_HOST` header in `raw_host_with_port`.
533
891
 
534
- Fixes #14846.
892
+ Previously, an empty `X_FORWARDED_HOST` header would cause
893
+ `Actiondispatch::Http:URL.raw_host_with_port` to return `nil`, causing
894
+ `Actiondispatch::Http:URL.host` to raise a `NoMethodError`.
535
895
 
536
- *Larry Lv*
896
+ *Adam Forsyth*
897
+
898
+ * Allow `Bearer` as token-keyword in `Authorization-Header`.
537
899
 
538
- * Ensure the controller is always notified as soon as the client disconnects
539
- during live streaming, even when the controller is blocked on a write.
900
+ Additionally to `Token`, the keyword `Bearer` is acceptable as a keyword
901
+ for the auth-token. The `Bearer` keyword is described in the original
902
+ OAuth RFC and used in libraries like Angular-JWT.
540
903
 
541
- *Nicholas Jakobsen*, *Matthew Draper*
904
+ See #19094.
542
905
 
543
- * Routes specifying 'to:' must be a string that contains a "#" or a rack
544
- application. Use of a symbol should be replaced with `action: symbol`.
545
- Use of a string without a "#" should be replaced with `controller: string`.
906
+ *Peter Schröder*
546
907
 
547
- *Aaron Patterson*
908
+ * Drop request class from `RouteSet` constructor.
548
909
 
549
- * Fix URL generation with `:trailing_slash` such that it does not add
550
- a trailing slash after `.:format`
910
+ If you would like to use a custom request class, please subclass and implement
911
+ the `request_class` method.
551
912
 
552
- *Dan Langevin*
913
+ *tenderlove@ruby-lang.org*
553
914
 
554
- * Build full URI as string when processing path in integration tests for
555
- performance reasons. One consequence of this is that the leading slash
556
- is now required in integration test `process` helpers, whereas previously
557
- it could be omitted. The fact that this worked was a unintended consequence
558
- of the implementation and was never an intentional feature.
915
+ * Fallback to `ENV['RAILS_RELATIVE_URL_ROOT']` in `url_for`.
916
+
917
+ Fixed an issue where the `RAILS_RELATIVE_URL_ROOT` environment variable is not
918
+ prepended to the path when `url_for` is called. If `SCRIPT_NAME` (used by Rack)
919
+ is set, it takes precedence.
920
+
921
+ Fixes #5122.
922
+
923
+ *Yasyf Mohamedali*
924
+
925
+ * Partitioning of routes is now done when the routes are being drawn. This
926
+ helps to decrease the time spent filtering the routes during the first request.
559
927
 
560
928
  *Guo Xiang Tan*
561
929
 
562
- * Fix `'Stack level too deep'` when rendering `head :ok` in an action method
563
- called 'status' in a controller.
930
+ * Fix regression in functional tests. Responses should have default headers
931
+ assigned.
932
+
933
+ See #18423.
934
+
935
+ *Jeremy Kemper*, *Yves Senn*
936
+
937
+ * Deprecate `AbstractController#skip_action_callback` in favor of individual skip_callback methods
938
+ (which can be made to raise an error if no callback was removed).
939
+
940
+ *Iain Beeston*
941
+
942
+ * Alias the `ActionDispatch::Request#uuid` method to `ActionDispatch::Request#request_id`.
943
+ Due to implementation, `config.log_tags = [:request_id]` also works in substitute
944
+ for `config.log_tags = [:uuid]`.
945
+
946
+ *David Ilizarov*
947
+
948
+ * Change filter on /rails/info/routes to use an actual path regexp from rails
949
+ and not approximate javascript version. Oniguruma supports much more
950
+ extensive list of features than javascript regexp engine.
951
+
952
+ Fixes #18402.
953
+
954
+ *Ravil Bayramgalin*
955
+
956
+ * Non-string authenticity tokens do not raise NoMethodError when decoding
957
+ the masked token.
564
958
 
565
- Fixes #13905.
959
+ *Ville Lautanala*
566
960
 
567
- *Christiaan Van den Poel*
961
+ * Add `http_cache_forever` to Action Controller, so we can cache a response
962
+ that never gets expired.
568
963
 
569
- * Add MKCALENDAR HTTP method (RFC 4791).
964
+ *arthurnn*
570
965
 
571
- *Sergey Karpesh*
966
+ * `ActionController#translate` supports symbols as shortcuts.
967
+ When a shortcut is given it also performs the lookup without the action
968
+ name.
572
969
 
573
- * Instrument fragment cache metrics.
970
+ *Max Melentiev*
574
971
 
575
- Adds `:controller`: and `:action` keys to the instrumentation payload
576
- for the `*_fragment.action_controller` notifications. This allows tracking
577
- e.g. the fragment cache hit rates for each controller action.
972
+ * Expand `ActionController::ConditionalGet#fresh_when` and `stale?` to also
973
+ accept a collection of records as the first argument, so that the
974
+ following code can be written in a shorter form.
578
975
 
579
- *Daniel Schierbeck*
976
+ # Before
977
+ def index
978
+ @articles = Article.all
979
+ fresh_when(etag: @articles, last_modified: @articles.maximum(:updated_at))
980
+ end
580
981
 
581
- * Always use the provided port if the protocol is relative.
982
+ # After
983
+ def index
984
+ @articles = Article.all
985
+ fresh_when(@articles)
986
+ end
582
987
 
583
- Fixes #15043.
988
+ *claudiob*
584
989
 
585
- *Guilherme Cavalcanti*, *Andrew White*
990
+ * Explicitly ignored wildcard verbs when searching for HEAD routes before fallback
586
991
 
587
- * Moved `params[request_forgery_protection_token]` into its own method
588
- and improved tests.
992
+ Fixes an issue where a mounted rack app at root would intercept the HEAD
993
+ request causing an incorrect behavior during the fall back to GET requests.
589
994
 
590
- Fixes #11316.
995
+ Example:
591
996
 
592
- *Tom Kadwill*
997
+ draw do
998
+ get '/home' => 'test#index'
999
+ mount rack_app, at: '/'
1000
+ end
1001
+ head '/home'
1002
+ assert_response :success
593
1003
 
594
- * Added verification of route constraints given as a Proc or an object responding
595
- to `:matches?`. Previously, when given an non-complying object, it would just
596
- silently fail to enforce the constraint. It will now raise an `ArgumentError`
597
- when setting up the routes.
1004
+ In this case, a HEAD request runs through the routes the first time and fails
1005
+ to match anything. Then, it runs through the list with the fallback and matches
1006
+ `get '/home'`. The original behavior would match the rack app in the first pass.
598
1007
 
599
- *Xavier Defrang*
1008
+ *Terence Sun*
600
1009
 
601
- * Properly treat the entire IPv6 User Local Address space as private for
602
- purposes of remote IP detection. Also handle uppercase private IPv6
603
- addresses.
1010
+ * Discarded flash messages get removed before storing into session.
604
1011
 
605
- Fixes #12638.
1012
+ *Samuel Cochran*
606
1013
 
607
- *Caleb Spare*
1014
+ * Migrating xhr methods to keyword arguments syntax
1015
+ in `ActionController::TestCase` and `ActionDispatch::Integration`
608
1016
 
609
- * Fixed an issue with migrating legacy json cookies.
1017
+ Old syntax:
610
1018
 
611
- Previously, the `VerifyAndUpgradeLegacySignedMessage` assumes all incoming
612
- cookies are marshal-encoded. This is not the case when `secret_token` is
613
- used in conjunction with the `:json` or `:hybrid` serializer.
1019
+ xhr :get, :create, params: { id: 1 }
614
1020
 
615
- In those case, when upgrading to use `secret_key_base`, this would cause a
616
- `TypeError: incompatible marshal file format` and a 500 error for the user.
1021
+ New syntax example:
617
1022
 
618
- Fixes #14774.
1023
+ get :create, params: { id: 1 }, xhr: true
619
1024
 
620
- *Godfrey Chan*
1025
+ *Kir Shatrov*
621
1026
 
622
- * Make URL escaping more consistent:
1027
+ * Migrating to keyword arguments syntax in `ActionController::TestCase` and
1028
+ `ActionDispatch::Integration` HTTP request methods.
623
1029
 
624
- 1. Escape '%' characters in URLs - only unescaped data should be passed to URL helpers
625
- 2. Add an `escape_segment` helper to `Router::Utils` that escapes '/' characters
626
- 3. Use `escape_segment` rather than `escape_fragment` in optimized URL generation
627
- 4. Use `escape_segment` rather than `escape_path` in URL generation
1030
+ Example:
628
1031
 
629
- For point 4 there are two exceptions. Firstly, when a route uses wildcard segments
630
- (e.g. `*foo`) then we use `escape_path` as the value may contain '/' characters. This
631
- means that wildcard routes can't be optimized. Secondly, if a `:controller` segment
632
- is used in the path then this uses `escape_path` as the controller may be namespaced.
1032
+ post :create, params: { y: x }, session: { a: 'b' }
1033
+ get :view, params: { id: 1 }
1034
+ get :view, params: { id: 1 }, format: :json
633
1035
 
634
- Fixes #14629, #14636 and #14070.
1036
+ *Kir Shatrov*
635
1037
 
636
- *Andrew White*, *Edho Arief*
1038
+ * Preserve default url options when generating URLs.
637
1039
 
638
- * Add alias `ActionDispatch::Http::UploadedFile#to_io` to
639
- `ActionDispatch::Http::UploadedFile#tempfile`.
1040
+ Fixes an issue that would cause `default_url_options` to be lost when
1041
+ generating URLs with fewer positional arguments than parameters in the
1042
+ route definition.
640
1043
 
641
- *Tim Linquist*
1044
+ *Tekin Suleyman*
642
1045
 
643
- * Returns null type format when format is not know and controller is using `any`
644
- format block.
1046
+ * Deprecate `*_via_redirect` integration test methods.
645
1047
 
646
- Fixes #14462.
1048
+ Use `follow_redirect!` manually after the request call for the same behavior.
1049
+
1050
+ *Aditya Kapoor*
1051
+
1052
+ * Add `ActionController::Renderer` to render arbitrary templates
1053
+ outside controller actions.
1054
+
1055
+ Its functionality is accessible through class methods `render` and
1056
+ `renderer` of `ActionController::Base`.
1057
+
1058
+ *Ravil Bayramgalin*
1059
+
1060
+ * Support `:assigns` option when rendering with controllers/mailers.
1061
+
1062
+ *Ravil Bayramgalin*
1063
+
1064
+ * Default headers, removed in controller actions, are no longer reapplied on
1065
+ the test response.
1066
+
1067
+ *Jonas Baumann*
1068
+
1069
+ * Deprecate all `*_filter` callbacks in favor of `*_action` callbacks.
647
1070
 
648
1071
  *Rafael Mendonça França*
649
1072
 
650
- * Improve routing error page with fuzzy matching search.
1073
+ * Allow you to pass `prepend: false` to `protect_from_forgery` to have the
1074
+ verification callback appended instead of prepended to the chain.
1075
+ This allows you to let the verification step depend on prior callbacks.
651
1076
 
652
- *Winston*
1077
+ Example:
653
1078
 
654
- * Only make deeply nested routes shallow when parent is shallow.
1079
+ class ApplicationController < ActionController::Base
1080
+ before_action :authenticate
1081
+ protect_from_forgery prepend: false, unless: -> { @authenticated_by.oauth? }
655
1082
 
656
- Fixes #14684.
1083
+ private
1084
+ def authenticate
1085
+ if oauth_request?
1086
+ # authenticate with oauth
1087
+ @authenticated_by = 'oauth'.inquiry
1088
+ else
1089
+ # authenticate with cookies
1090
+ @authenticated_by = 'cookie'.inquiry
1091
+ end
1092
+ end
1093
+ end
657
1094
 
658
- *Andrew White*, *James Coglan*
1095
+ *Josef Šimánek*
659
1096
 
660
- * Append link to bad code to backtrace when exception is `SyntaxError`.
1097
+ * Remove `ActionController::HideActions`.
661
1098
 
662
- *Boris Kuznetsov*
1099
+ *Ravil Bayramgalin*
663
1100
 
664
- * Swapped the parameters of assert_equal in `assert_select` so that the
665
- proper values were printed correctly.
1101
+ * Remove `respond_to`/`respond_with` placeholder methods, this functionality
1102
+ has been extracted to the `responders` gem.
666
1103
 
667
- Fixes #14422.
1104
+ *Carlos Antonio da Silva*
668
1105
 
669
- *Vishal Lal*
1106
+ * Remove deprecated assertion files.
670
1107
 
671
- * The method `shallow?` returns false if the parent resource is a singleton so
672
- we need to check if we're not inside a nested scope before copying the :path
673
- and :as options to their shallow equivalents.
1108
+ *Rafael Mendonça França*
674
1109
 
675
- Fixes #14388.
1110
+ * Remove deprecated usage of string keys in URL helpers.
676
1111
 
677
- *Andrew White*
1112
+ *Rafael Mendonça França*
1113
+
1114
+ * Remove deprecated `only_path` option on `*_path` helpers.
1115
+
1116
+ *Rafael Mendonça França*
1117
+
1118
+ * Remove deprecated `NamedRouteCollection#helpers`.
1119
+
1120
+ *Rafael Mendonça França*
1121
+
1122
+ * Remove deprecated support to define routes with `:to` option that doesn't contain `#`.
1123
+
1124
+ *Rafael Mendonça França*
1125
+
1126
+ * Remove deprecated `ActionDispatch::Response#to_ary`.
1127
+
1128
+ *Rafael Mendonça França*
1129
+
1130
+ * Remove deprecated `ActionDispatch::Request#deep_munge`.
1131
+
1132
+ *Rafael Mendonça França*
1133
+
1134
+ * Remove deprecated `ActionDispatch::Http::Parameters#symbolized_path_parameters`.
1135
+
1136
+ *Rafael Mendonça França*
1137
+
1138
+ * Remove deprecated option `use_route` in controller tests.
1139
+
1140
+ *Rafael Mendonça França*
1141
+
1142
+ * Ensure `append_info_to_payload` is called even if an exception is raised.
678
1143
 
679
- * Make logging of CSRF failures optional (but on by default) with the
680
- `log_warning_on_csrf_failure` configuration setting in
681
- `ActionController::RequestForgeryProtection`.
1144
+ Fixes an issue where when an exception is raised in the request the additional
1145
+ payload data is not available.
1146
+
1147
+ See #14903.
682
1148
 
683
- *John Barton*
1149
+ *Dieter Komendera*, *Margus Pärt*
684
1150
 
685
- * Fix URL generation in controller tests with request-dependent
686
- `default_url_options` methods.
1151
+ * Correctly rely on the response's status code to handle calls to `head`.
1152
+
1153
+ *Robin Dupret*
1154
+
1155
+ * Using `head` method returns empty response_body instead
1156
+ of returning a single space " ".
1157
+
1158
+ The old behavior was added as a workaround for a bug in an early
1159
+ version of Safari, where the HTTP headers are not returned correctly
1160
+ if the response body has a 0-length. This is been fixed since and
1161
+ the workaround is no longer necessary.
687
1162
 
688
- *Tony Wooster*
1163
+ Fixes #18253.
1164
+
1165
+ *Prathamesh Sonpatki*
1166
+
1167
+ * Fix how polymorphic routes works with objects that implement `to_model`.
1168
+
1169
+ *Travis Grathwell*
1170
+
1171
+ * Stop converting empty arrays in `params` to `nil`.
1172
+
1173
+ This behavior was introduced in response to CVE-2012-2660, CVE-2012-2694
1174
+ and CVE-2013-0155
1175
+
1176
+ ActiveRecord now issues a safe query when passing an empty array into
1177
+ a where clause, so there is no longer a need to defend against this type
1178
+ of input (any nils are still stripped from the array).
1179
+
1180
+ *Chris Sinjakli*
1181
+
1182
+ * Remove `ActionController::ModelNaming` module.
1183
+
1184
+ *claudiob*
1185
+
1186
+ * Fixed usage of optional scopes in url helpers.
1187
+
1188
+ *Alex Robbin*
1189
+
1190
+ * Fixed handling of positional url helper arguments when `format: false`.
1191
+
1192
+ Fixes #17819.
1193
+
1194
+ *Andrew White*, *Tatiana Soukiassian*
689
1195
 
690
- Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionpack/CHANGELOG.md) for previous changes.
1196
+ Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionpack/CHANGELOG.md) for previous changes.