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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +890 -384
- data/MIT-LICENSE +1 -1
- data/README.rdoc +2 -3
- data/lib/abstract_controller/base.rb +28 -38
- data/lib/{action_controller → abstract_controller}/caching/fragments.rb +51 -11
- data/lib/abstract_controller/caching.rb +62 -0
- data/lib/abstract_controller/callbacks.rb +54 -19
- data/lib/abstract_controller/collector.rb +4 -9
- data/lib/abstract_controller/error.rb +4 -0
- data/lib/abstract_controller/helpers.rb +4 -3
- data/lib/abstract_controller/railties/routes_helpers.rb +2 -2
- data/lib/abstract_controller/rendering.rb +28 -18
- data/lib/abstract_controller/translation.rb +8 -7
- data/lib/abstract_controller.rb +6 -2
- data/lib/action_controller/api/api_rendering.rb +14 -0
- data/lib/action_controller/api.rb +147 -0
- data/lib/action_controller/base.rb +14 -11
- data/lib/action_controller/caching.rb +13 -58
- data/lib/action_controller/form_builder.rb +48 -0
- data/lib/action_controller/log_subscriber.rb +3 -10
- data/lib/action_controller/metal/basic_implicit_render.rb +11 -0
- data/lib/action_controller/metal/conditional_get.rb +106 -34
- data/lib/action_controller/metal/cookies.rb +1 -3
- data/lib/action_controller/metal/data_streaming.rb +14 -34
- data/lib/action_controller/metal/etag_with_template_digest.rb +8 -2
- data/lib/action_controller/metal/exceptions.rb +11 -6
- data/lib/action_controller/metal/force_ssl.rb +11 -11
- data/lib/action_controller/metal/head.rb +14 -8
- data/lib/action_controller/metal/helpers.rb +15 -6
- data/lib/action_controller/metal/http_authentication.rb +44 -35
- data/lib/action_controller/metal/implicit_render.rb +61 -6
- data/lib/action_controller/metal/instrumentation.rb +5 -5
- data/lib/action_controller/metal/live.rb +71 -88
- data/lib/action_controller/metal/mime_responds.rb +27 -42
- data/lib/action_controller/metal/params_wrapper.rb +9 -9
- data/lib/action_controller/metal/redirecting.rb +32 -9
- data/lib/action_controller/metal/renderers.rb +83 -40
- data/lib/action_controller/metal/rendering.rb +38 -6
- data/lib/action_controller/metal/request_forgery_protection.rb +126 -48
- data/lib/action_controller/metal/rescue.rb +3 -12
- data/lib/action_controller/metal/streaming.rb +4 -4
- data/lib/action_controller/metal/strong_parameters.rb +527 -134
- data/lib/action_controller/metal/testing.rb +1 -12
- data/lib/action_controller/metal/url_for.rb +12 -5
- data/lib/action_controller/metal.rb +88 -63
- data/lib/action_controller/railtie.rb +11 -7
- data/lib/action_controller/renderer.rb +113 -0
- data/lib/action_controller/template_assertions.rb +9 -0
- data/lib/action_controller/test_case.rb +311 -374
- data/lib/action_controller.rb +12 -9
- data/lib/action_dispatch/http/cache.rb +73 -34
- data/lib/action_dispatch/http/filter_parameters.rb +16 -12
- data/lib/action_dispatch/http/filter_redirect.rb +7 -8
- data/lib/action_dispatch/http/headers.rb +45 -14
- data/lib/action_dispatch/http/mime_negotiation.rb +42 -23
- data/lib/action_dispatch/http/mime_type.rb +126 -90
- data/lib/action_dispatch/http/mime_types.rb +3 -4
- data/lib/action_dispatch/http/parameter_filter.rb +19 -9
- data/lib/action_dispatch/http/parameters.rb +70 -40
- data/lib/action_dispatch/http/request.rb +144 -89
- data/lib/action_dispatch/http/response.rb +215 -102
- data/lib/action_dispatch/http/upload.rb +6 -2
- data/lib/action_dispatch/http/url.rb +117 -8
- data/lib/action_dispatch/journey/formatter.rb +47 -30
- data/lib/action_dispatch/journey/gtg/transition_table.rb +1 -1
- data/lib/action_dispatch/journey/nfa/dot.rb +0 -2
- data/lib/action_dispatch/journey/nfa/transition_table.rb +1 -46
- data/lib/action_dispatch/journey/nodes/node.rb +14 -4
- data/lib/action_dispatch/journey/parser.rb +2 -0
- data/lib/action_dispatch/journey/parser_extras.rb +8 -2
- data/lib/action_dispatch/journey/path/pattern.rb +38 -42
- data/lib/action_dispatch/journey/route.rb +88 -26
- data/lib/action_dispatch/journey/router/utils.rb +5 -5
- data/lib/action_dispatch/journey/router.rb +8 -10
- data/lib/action_dispatch/journey/routes.rb +14 -15
- data/lib/action_dispatch/journey/visitors.rb +89 -44
- data/lib/action_dispatch/middleware/callbacks.rb +10 -1
- data/lib/action_dispatch/middleware/cookies.rb +188 -134
- data/lib/action_dispatch/middleware/debug_exceptions.rb +128 -49
- data/lib/action_dispatch/middleware/debug_locks.rb +122 -0
- data/lib/action_dispatch/middleware/exception_wrapper.rb +21 -21
- data/lib/action_dispatch/middleware/executor.rb +19 -0
- data/lib/action_dispatch/middleware/flash.rb +66 -45
- data/lib/action_dispatch/middleware/params_parser.rb +32 -46
- data/lib/action_dispatch/middleware/public_exceptions.rb +2 -2
- data/lib/action_dispatch/middleware/reloader.rb +14 -58
- data/lib/action_dispatch/middleware/remote_ip.rb +29 -19
- data/lib/action_dispatch/middleware/request_id.rb +11 -6
- data/lib/action_dispatch/middleware/session/abstract_store.rb +23 -11
- data/lib/action_dispatch/middleware/session/cache_store.rb +9 -6
- data/lib/action_dispatch/middleware/session/cookie_store.rb +30 -24
- data/lib/action_dispatch/middleware/session/mem_cache_store.rb +4 -0
- data/lib/action_dispatch/middleware/show_exceptions.rb +11 -9
- data/lib/action_dispatch/middleware/ssl.rb +124 -36
- data/lib/action_dispatch/middleware/stack.rb +44 -40
- data/lib/action_dispatch/middleware/static.rb +51 -35
- data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +2 -14
- data/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
- data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +1 -1
- data/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +1 -1
- data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +4 -4
- data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +59 -63
- data/lib/action_dispatch/railtie.rb +2 -2
- data/lib/action_dispatch/request/session.rb +69 -33
- data/lib/action_dispatch/request/utils.rb +51 -19
- data/lib/action_dispatch/routing/inspector.rb +32 -43
- data/lib/action_dispatch/routing/mapper.rb +515 -348
- data/lib/action_dispatch/routing/polymorphic_routes.rb +8 -14
- data/lib/action_dispatch/routing/redirection.rb +5 -4
- data/lib/action_dispatch/routing/route_set.rb +148 -240
- data/lib/action_dispatch/routing/url_for.rb +27 -10
- data/lib/action_dispatch/routing.rb +17 -13
- data/lib/action_dispatch/testing/assertion_response.rb +45 -0
- data/lib/action_dispatch/testing/assertions/response.rb +38 -20
- data/lib/action_dispatch/testing/assertions/routing.rb +16 -12
- data/lib/action_dispatch/testing/assertions.rb +1 -1
- data/lib/action_dispatch/testing/integration.rb +377 -149
- data/lib/action_dispatch/testing/request_encoder.rb +53 -0
- data/lib/action_dispatch/testing/test_process.rb +24 -20
- data/lib/action_dispatch/testing/test_request.rb +22 -31
- data/lib/action_dispatch/testing/test_response.rb +12 -4
- data/lib/action_dispatch.rb +4 -1
- data/lib/action_pack/gem_version.rb +4 -4
- data/lib/action_pack.rb +1 -1
- metadata +32 -34
- data/lib/action_controller/metal/hide_actions.rb +0 -40
- data/lib/action_controller/metal/rack_delegation.rb +0 -32
- data/lib/action_controller/middleware.rb +0 -39
- data/lib/action_controller/model_naming.rb +0 -12
- data/lib/action_dispatch/journey/backwards.rb +0 -5
- data/lib/action_dispatch/journey/router/strexp.rb +0 -27
- data/lib/action_dispatch/testing/assertions/dom.rb +0 -3
- data/lib/action_dispatch/testing/assertions/selector.rb +0 -3
- data/lib/action_dispatch/testing/assertions/tag.rb +0 -3
- /data/lib/action_dispatch/middleware/templates/rescues/{_source.erb → _source.html.erb} +0 -0
data/CHANGELOG.md
CHANGED
@@ -1,34 +1,92 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 5.0.7.2 (March 11, 2019) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails
|
6
|
+
## Rails 5.0.7.1 (November 27, 2018) ##
|
7
7
|
|
8
8
|
* No changes.
|
9
9
|
|
10
10
|
|
11
|
-
## Rails
|
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
|
24
|
+
## Rails 5.0.6.rc1 (August 24, 2017) ##
|
17
25
|
|
18
26
|
* No changes.
|
19
27
|
|
20
28
|
|
21
|
-
## Rails
|
29
|
+
## Rails 5.0.5 (July 31, 2017) ##
|
22
30
|
|
23
|
-
*
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
123
|
+
Fixes #25820.
|
63
124
|
|
125
|
+
*Jon Moss*
|
64
126
|
|
65
|
-
|
127
|
+
* Fix malformed URLS when using `ApplicationController.renderer`
|
66
128
|
|
67
|
-
|
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
|
-
|
135
|
+
*George Vrettos*
|
71
136
|
|
72
|
-
*
|
137
|
+
* Commit flash changes when using a redirect route.
|
73
138
|
|
139
|
+
Fixes #27992.
|
74
140
|
|
75
|
-
|
141
|
+
*Andrew White*
|
76
142
|
|
77
|
-
* Do not allow render with unpermitted parameter.
|
78
143
|
|
79
|
-
|
144
|
+
## Rails 5.0.2 (March 01, 2017) ##
|
80
145
|
|
81
|
-
|
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
|
-
|
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
|
-
|
156
|
+
Fixes #27344.
|
90
157
|
|
91
|
-
*
|
92
|
-
early in the `setup` chain.
|
158
|
+
*Matthew Draper*
|
93
159
|
|
94
|
-
*Yves Senn*
|
95
160
|
|
96
|
-
|
161
|
+
## Rails 5.0.1.rc2 (December 10, 2016) ##
|
97
162
|
|
98
|
-
|
163
|
+
* Move `cookies`, `flash`, and `session` methods back to
|
164
|
+
`ActionDispatch::Integration::Session`.
|
99
165
|
|
100
|
-
*
|
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
|
-
|
168
|
+
* Do not reset in `ActionDispatch::IntegrationTest#open_session`; doing so
|
169
|
+
is incompatible with existing (unintended) API usage.
|
105
170
|
|
106
|
-
*
|
171
|
+
*Sean Griffin*
|
107
172
|
|
108
|
-
* `url_for` does not modify its arguments when generating polymorphic URLs.
|
109
173
|
|
110
|
-
|
174
|
+
## Rails 5.0.1.rc1 (December 01, 2016) ##
|
111
175
|
|
112
|
-
*
|
113
|
-
|
176
|
+
* Fixed error caused by `force_ssl_redirect` when `session_store` is
|
177
|
+
enabled.
|
114
178
|
|
115
|
-
|
179
|
+
Fixes #19679.
|
116
180
|
|
181
|
+
*Taishi Kasuga*
|
117
182
|
|
118
|
-
|
183
|
+
* Use accept header in integration tests with `as: :json`
|
119
184
|
|
120
|
-
|
121
|
-
|
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
|
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
|
-
|
190
|
+
Fixes #27144.
|
128
191
|
|
129
|
-
*
|
192
|
+
*Kasper Timm Hansen*
|
130
193
|
|
131
|
-
|
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
|
-
|
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
|
-
|
203
|
+
Fixes #27144.
|
139
204
|
|
140
|
-
*
|
141
|
-
nesting multiple routes.
|
205
|
+
* Fixes incorrect output from rails routes when using singular resources.
|
142
206
|
|
143
|
-
|
207
|
+
Fixes #26606.
|
144
208
|
|
145
|
-
*
|
209
|
+
*Erick Reyna*
|
146
210
|
|
147
|
-
*
|
148
|
-
|
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
|
-
|
215
|
+
Fixes #26134.
|
151
216
|
|
152
|
-
*
|
217
|
+
*Vipul A M*
|
153
218
|
|
154
|
-
*
|
219
|
+
* Add `ActionController::Parameters#merge!`, which behaves the same as `Hash#merge!`.
|
155
220
|
|
156
|
-
|
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
|
-
|
223
|
+
* Added `ActionController::Parameters#deep_dup` which actually creates
|
224
|
+
a params copy, instead of refereing to old references in params.
|
161
225
|
|
162
|
-
|
226
|
+
Fixes #26566.
|
163
227
|
|
164
|
-
|
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
|
-
|
230
|
+
* Make `fixture_file_upload` work in integration tests.
|
169
231
|
|
170
|
-
*
|
232
|
+
*Yuji Yaginuma*
|
171
233
|
|
172
|
-
*
|
173
|
-
assigned.
|
234
|
+
* Add `to_param` to `ActionController::Parameters` deprecations.
|
174
235
|
|
175
|
-
|
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
|
-
*
|
239
|
+
*Kir Shatrov*
|
178
240
|
|
241
|
+
* Fix nested multiple roots
|
179
242
|
|
180
|
-
|
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
|
-
|
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
|
-
|
256
|
+
*Ryo Hashimoto*, *Andrew White*
|
186
257
|
|
187
|
-
*
|
188
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
195
|
-
|
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
|
-
|
200
|
-
|
201
|
-
|
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
|
-
|
502
|
+
Can now be written as:
|
211
503
|
|
212
|
-
|
504
|
+
```ruby
|
505
|
+
require 'test_helper'
|
213
506
|
|
214
|
-
|
215
|
-
|
216
|
-
|
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
|
-
|
513
|
+
assert_equal({ 'id' => Article.last.id, 'title' => 'Ahoy!' }, response.parsed_body)
|
514
|
+
end
|
515
|
+
end
|
516
|
+
```
|
219
517
|
|
220
|
-
|
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
|
-
|
223
|
-
the
|
521
|
+
Then on the response side, `parsed_body` will parse the body according to the
|
522
|
+
content type the response has.
|
224
523
|
|
225
|
-
|
524
|
+
Currently JSON is the only supported MIME type. Add your own with
|
525
|
+
`ActionDispatch::IntegrationTest.register_encoder`.
|
226
526
|
|
227
|
-
*
|
527
|
+
*Kasper Timm Hansen*
|
228
528
|
|
229
|
-
|
230
|
-
payload data is not available.
|
529
|
+
* Add "image/svg+xml" as a default mime type.
|
231
530
|
|
232
|
-
|
233
|
-
* #14903
|
234
|
-
* https://github.com/roidrage/lograge/issues/37
|
531
|
+
*DHH*
|
235
532
|
|
236
|
-
|
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
|
-
|
536
|
+
Deprecate `CONTROLLER` env variable in `bin/rails routes`.
|
239
537
|
|
240
|
-
|
538
|
+
See #18902.
|
241
539
|
|
242
|
-
*
|
243
|
-
of returning a single space " ".
|
540
|
+
*Anton Davydov*, *Vipul A M*
|
244
541
|
|
245
|
-
|
246
|
-
|
247
|
-
|
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 #
|
546
|
+
Fixes #17556.
|
251
547
|
|
252
|
-
*
|
548
|
+
*Abhishek Yadav*
|
253
549
|
|
254
|
-
*
|
550
|
+
* Provide the name of HTTP Status code in assertions.
|
255
551
|
|
256
|
-
*
|
552
|
+
*Sean Collins*
|
257
553
|
|
258
|
-
*
|
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 #
|
558
|
+
Fixes #22918.
|
261
559
|
|
262
|
-
*
|
560
|
+
*Edouard Chin*
|
263
561
|
|
264
|
-
*
|
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
|
-
|
566
|
+
Fixes #22832.
|
267
567
|
|
568
|
+
*Prathamesh Sonpatki*
|
268
569
|
|
269
|
-
|
570
|
+
* Add option for per-form CSRF tokens.
|
270
571
|
|
271
|
-
*
|
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
|
-
|
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
|
-
|
279
|
-
prefix.
|
578
|
+
Fixes #22841.
|
280
579
|
|
281
|
-
|
580
|
+
*Prathamesh Sonpatki*
|
282
581
|
|
283
|
-
|
582
|
+
* Add `ActionController::Parameters#include?`
|
284
583
|
|
285
|
-
*
|
584
|
+
*Justin Coyne*
|
286
585
|
|
287
|
-
|
288
|
-
|
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
|
-
*
|
590
|
+
*Derek Prior*
|
291
591
|
|
292
|
-
*
|
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
|
-
|
295
|
-
be safely removed; otherwise, the corresponding `*_url` helper should be
|
296
|
-
used instead.
|
596
|
+
*Derek Prior*
|
297
597
|
|
298
|
-
|
598
|
+
* `ActionController::TestCase` will be moved to its own gem in Rails 5.1.
|
299
599
|
|
300
|
-
|
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
|
-
|
605
|
+
This is a documentation deprecation so that going forward new tests will use
|
606
|
+
`ActionDispatch::IntegrationTest` instead of `ActionController::TestCase`.
|
303
607
|
|
304
|
-
|
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
|
-
|
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
|
-
|
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
|
-
*
|
313
|
-
(using `#to_ary`) so we could conveniently use implicit splatting:
|
618
|
+
*Jorge Bejar*
|
314
619
|
|
315
|
-
|
620
|
+
* Change the `protect_from_forgery` prepend default to `false`.
|
316
621
|
|
317
|
-
|
318
|
-
|
319
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
635
|
+
Example:
|
326
636
|
|
327
|
-
|
328
|
-
|
637
|
+
```ruby
|
638
|
+
protect_from_forgery prepend: true
|
639
|
+
```
|
640
|
+
|
641
|
+
*Eileen M. Uchitelle*
|
329
642
|
|
330
|
-
|
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
|
-
*
|
333
|
-
routes.
|
647
|
+
*Paul Grayson*
|
334
648
|
|
335
|
-
|
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
|
-
*
|
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
|
-
|
344
|
-
|
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
|
-
|
684
|
+
* Allow multiple `root` routes in same scope level. Example:
|
347
685
|
|
348
|
-
|
686
|
+
Example:
|
349
687
|
|
350
|
-
|
351
|
-
|
352
|
-
GET routes.
|
688
|
+
root 'blog#show', constraints: ->(req) { Hostname.blog_site?(req.host) }
|
689
|
+
root 'landing#show'
|
353
690
|
|
354
|
-
*
|
691
|
+
*Rafael Sales*
|
355
692
|
|
356
|
-
*
|
357
|
-
|
358
|
-
|
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
|
-
|
697
|
+
Fixes #20920. Fixes #21459.
|
361
698
|
|
362
|
-
*
|
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
|
-
|
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
|
-
*
|
370
|
-
|
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
|
-
|
377
|
-
name: 'Senjougahara Hitagi',
|
378
|
-
oddity: 'Heavy stone crab'
|
379
|
-
})
|
380
|
-
params.to_h
|
381
|
-
# => {}
|
709
|
+
Mime::HTML
|
382
710
|
|
383
|
-
|
384
|
-
unsafe_params.to_h
|
385
|
-
# => {"name"=>"Senjougahara Hitagi", "oddity"=>"Heavy stone crab"}
|
711
|
+
To this:
|
386
712
|
|
387
|
-
|
388
|
-
safe_params.to_h
|
389
|
-
# => {"name"=>"Senjougahara Hitagi"}
|
713
|
+
Mime[:html]
|
390
714
|
|
391
|
-
This change is
|
392
|
-
|
393
|
-
|
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
|
-
|
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
|
-
*
|
723
|
+
* `url_for` does not modify its arguments when generating polymorphic URLs.
|
398
724
|
|
399
|
-
*
|
725
|
+
*Bernerd Schaefer*
|
400
726
|
|
401
|
-
*
|
402
|
-
|
403
|
-
|
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
|
-
|
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
|
-
|
759
|
+
* Using strings or symbols for middleware class names is deprecated. Convert
|
760
|
+
things like this:
|
408
761
|
|
409
|
-
|
410
|
-
digest. The default remains the same - 'SHA1'.
|
762
|
+
middleware.use "Foo::Bar"
|
411
763
|
|
412
|
-
|
764
|
+
to this:
|
413
765
|
|
414
|
-
|
415
|
-
the `responders` gem.
|
766
|
+
middleware.use Foo::Bar
|
416
767
|
|
417
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
427
|
-
|
777
|
+
* Fix `ActionController::Parameters#fetch` overwriting `KeyError` returned by
|
778
|
+
default block.
|
428
779
|
|
429
|
-
|
780
|
+
*Jonas Schuber Erlandsson*, *Roque Pinel*
|
430
781
|
|
431
|
-
|
782
|
+
* `ActionController::Parameters` no longer inherits from
|
783
|
+
`HashWithIndifferentAccess`
|
432
784
|
|
433
|
-
|
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
|
-
|
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
|
-
*
|
438
|
-
in favor of `AbstractController::Helpers::MissingHelperError`.
|
794
|
+
*Prem Sichanugrist*
|
439
795
|
|
440
|
-
|
796
|
+
* Replaced `ActiveSupport::Concurrency::Latch` with `Concurrent::CountDownLatch`
|
797
|
+
from the concurrent-ruby gem.
|
441
798
|
|
442
|
-
*
|
799
|
+
*Jerry D'Antonio*
|
443
800
|
|
444
|
-
|
801
|
+
* Add ability to filter parameters based on parent keys.
|
445
802
|
|
446
|
-
|
447
|
-
|
803
|
+
# matches {credit_card: {code: "xxxx"}}
|
804
|
+
# doesn't match {file: { code: "xxxx"}}
|
805
|
+
config.filter_parameters += [ "credit_card.code" ]
|
448
806
|
|
449
|
-
|
807
|
+
See #13897.
|
450
808
|
|
451
|
-
*
|
452
|
-
loopback address.
|
809
|
+
*Guillaume Malette*
|
453
810
|
|
454
|
-
|
811
|
+
* Deprecate passing first parameter as `Hash` and default status code for `head` method.
|
455
812
|
|
456
|
-
*
|
457
|
-
`env["action_dispatch.original_path"]`
|
813
|
+
*Mehmet Emin İNAÇ*
|
458
814
|
|
459
|
-
|
460
|
-
|
461
|
-
|
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
|
-
*
|
468
|
-
|
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
|
-
*
|
825
|
+
*Santiago Pastorino*, *Jorge Bejar*
|
471
826
|
|
472
|
-
*
|
473
|
-
|
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
|
-
|
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
|
-
|
832
|
+
*Alan Guo Xiang Tan*
|
481
833
|
|
482
|
-
|
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
|
-
|
838
|
+
See #20017.
|
485
839
|
|
486
|
-
*
|
487
|
-
("Rosetta Flash").
|
840
|
+
*Eliot Sykes*
|
488
841
|
|
489
|
-
|
842
|
+
* Deprecate `:nothing` option for `render` method.
|
490
843
|
|
491
|
-
*
|
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
|
-
|
846
|
+
* Fix `rake routes` not showing the right format when
|
847
|
+
nesting multiple routes.
|
497
848
|
|
498
|
-
|
849
|
+
See #18373.
|
499
850
|
|
500
|
-
*
|
851
|
+
*Ravil Bayramgalin*
|
501
852
|
|
502
|
-
|
853
|
+
* Add ability to override default form builder for a controller.
|
503
854
|
|
504
|
-
|
855
|
+
class AdminController < ApplicationController
|
856
|
+
default_form_builder AdminFormBuilder
|
857
|
+
end
|
505
858
|
|
506
|
-
*
|
507
|
-
when rendering through a `respond_to` block.
|
859
|
+
*Kevin McPhillips*
|
508
860
|
|
509
|
-
|
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
|
-
|
865
|
+
See #19036.
|
512
866
|
|
513
|
-
*
|
514
|
-
parameters are permitted globally. The default value of this configuration is
|
515
|
-
`['controller', 'action']`.
|
867
|
+
*Stephen Bussey*
|
516
868
|
|
517
|
-
|
869
|
+
* Provide friendlier access to request variants.
|
518
870
|
|
519
|
-
|
871
|
+
request.variant = :phone
|
872
|
+
request.variant.phone? # true
|
873
|
+
request.variant.tablet? # false
|
520
874
|
|
521
|
-
|
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
|
-
*
|
881
|
+
*George Claghorn*
|
524
882
|
|
525
|
-
*
|
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
|
-
|
886
|
+
See #19271.
|
528
887
|
|
529
|
-
*
|
888
|
+
*Kohei Suzuki*
|
530
889
|
|
531
|
-
*
|
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
|
-
|
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
|
-
*
|
896
|
+
*Adam Forsyth*
|
897
|
+
|
898
|
+
* Allow `Bearer` as token-keyword in `Authorization-Header`.
|
537
899
|
|
538
|
-
|
539
|
-
|
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
|
-
|
904
|
+
See #19094.
|
542
905
|
|
543
|
-
*
|
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
|
-
|
908
|
+
* Drop request class from `RouteSet` constructor.
|
548
909
|
|
549
|
-
|
550
|
-
|
910
|
+
If you would like to use a custom request class, please subclass and implement
|
911
|
+
the `request_class` method.
|
551
912
|
|
552
|
-
*
|
913
|
+
*tenderlove@ruby-lang.org*
|
553
914
|
|
554
|
-
*
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
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
|
563
|
-
|
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
|
-
|
959
|
+
*Ville Lautanala*
|
566
960
|
|
567
|
-
|
961
|
+
* Add `http_cache_forever` to Action Controller, so we can cache a response
|
962
|
+
that never gets expired.
|
568
963
|
|
569
|
-
*
|
964
|
+
*arthurnn*
|
570
965
|
|
571
|
-
|
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
|
-
*
|
970
|
+
*Max Melentiev*
|
574
971
|
|
575
|
-
|
576
|
-
|
577
|
-
|
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
|
-
|
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
|
-
|
982
|
+
# After
|
983
|
+
def index
|
984
|
+
@articles = Article.all
|
985
|
+
fresh_when(@articles)
|
986
|
+
end
|
582
987
|
|
583
|
-
|
988
|
+
*claudiob*
|
584
989
|
|
585
|
-
|
990
|
+
* Explicitly ignored wildcard verbs when searching for HEAD routes before fallback
|
586
991
|
|
587
|
-
|
588
|
-
|
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
|
-
|
995
|
+
Example:
|
591
996
|
|
592
|
-
|
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
|
-
|
595
|
-
to
|
596
|
-
|
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
|
-
*
|
1008
|
+
*Terence Sun*
|
600
1009
|
|
601
|
-
*
|
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
|
-
|
1012
|
+
*Samuel Cochran*
|
606
1013
|
|
607
|
-
|
1014
|
+
* Migrating xhr methods to keyword arguments syntax
|
1015
|
+
in `ActionController::TestCase` and `ActionDispatch::Integration`
|
608
1016
|
|
609
|
-
|
1017
|
+
Old syntax:
|
610
1018
|
|
611
|
-
|
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
|
-
|
616
|
-
`TypeError: incompatible marshal file format` and a 500 error for the user.
|
1021
|
+
New syntax example:
|
617
1022
|
|
618
|
-
|
1023
|
+
get :create, params: { id: 1 }, xhr: true
|
619
1024
|
|
620
|
-
*
|
1025
|
+
*Kir Shatrov*
|
621
1026
|
|
622
|
-
*
|
1027
|
+
* Migrating to keyword arguments syntax in `ActionController::TestCase` and
|
1028
|
+
`ActionDispatch::Integration` HTTP request methods.
|
623
1029
|
|
624
|
-
|
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
|
-
|
630
|
-
|
631
|
-
|
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
|
-
|
1036
|
+
*Kir Shatrov*
|
635
1037
|
|
636
|
-
|
1038
|
+
* Preserve default url options when generating URLs.
|
637
1039
|
|
638
|
-
|
639
|
-
|
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
|
-
*
|
1044
|
+
*Tekin Suleyman*
|
642
1045
|
|
643
|
-
*
|
644
|
-
format block.
|
1046
|
+
* Deprecate `*_via_redirect` integration test methods.
|
645
1047
|
|
646
|
-
|
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
|
-
*
|
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
|
-
|
1077
|
+
Example:
|
653
1078
|
|
654
|
-
|
1079
|
+
class ApplicationController < ActionController::Base
|
1080
|
+
before_action :authenticate
|
1081
|
+
protect_from_forgery prepend: false, unless: -> { @authenticated_by.oauth? }
|
655
1082
|
|
656
|
-
|
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
|
-
*
|
1095
|
+
*Josef Šimánek*
|
659
1096
|
|
660
|
-
*
|
1097
|
+
* Remove `ActionController::HideActions`.
|
661
1098
|
|
662
|
-
*
|
1099
|
+
*Ravil Bayramgalin*
|
663
1100
|
|
664
|
-
*
|
665
|
-
|
1101
|
+
* Remove `respond_to`/`respond_with` placeholder methods, this functionality
|
1102
|
+
has been extracted to the `responders` gem.
|
666
1103
|
|
667
|
-
|
1104
|
+
*Carlos Antonio da Silva*
|
668
1105
|
|
669
|
-
|
1106
|
+
* Remove deprecated assertion files.
|
670
1107
|
|
671
|
-
*
|
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
|
-
|
1110
|
+
* Remove deprecated usage of string keys in URL helpers.
|
676
1111
|
|
677
|
-
*
|
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
|
-
|
680
|
-
|
681
|
-
|
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
|
-
*
|
1149
|
+
*Dieter Komendera*, *Margus Pärt*
|
684
1150
|
|
685
|
-
*
|
686
|
-
|
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
|
-
|
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-
|
1196
|
+
Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionpack/CHANGELOG.md) for previous changes.
|