actionpack 4.2.11.3 → 5.0.0.beta1
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 +5 -5
- data/CHANGELOG.md +379 -462
- data/MIT-LICENSE +1 -1
- data/README.rdoc +2 -3
- data/lib/abstract_controller.rb +0 -2
- data/lib/abstract_controller/base.rb +17 -32
- data/lib/abstract_controller/callbacks.rb +52 -19
- data/lib/abstract_controller/collector.rb +4 -9
- data/lib/abstract_controller/helpers.rb +2 -2
- data/lib/abstract_controller/railties/routes_helpers.rb +2 -2
- data/lib/abstract_controller/rendering.rb +27 -22
- data/lib/abstract_controller/translation.rb +8 -7
- data/lib/action_controller.rb +4 -3
- data/lib/action_controller/api.rb +146 -0
- data/lib/action_controller/base.rb +6 -10
- data/lib/action_controller/caching.rb +1 -3
- data/lib/action_controller/caching/fragments.rb +48 -3
- data/lib/action_controller/form_builder.rb +48 -0
- data/lib/action_controller/log_subscriber.rb +1 -10
- data/lib/action_controller/metal.rb +89 -62
- data/lib/action_controller/metal/basic_implicit_render.rb +11 -0
- data/lib/action_controller/metal/conditional_get.rb +65 -24
- data/lib/action_controller/metal/cookies.rb +0 -2
- data/lib/action_controller/metal/data_streaming.rb +2 -22
- data/lib/action_controller/metal/etag_with_template_digest.rb +1 -1
- data/lib/action_controller/metal/exceptions.rb +11 -6
- data/lib/action_controller/metal/force_ssl.rb +6 -6
- data/lib/action_controller/metal/head.rb +14 -7
- data/lib/action_controller/metal/helpers.rb +9 -5
- data/lib/action_controller/metal/http_authentication.rb +37 -38
- data/lib/action_controller/metal/implicit_render.rb +23 -6
- data/lib/action_controller/metal/instrumentation.rb +0 -1
- data/lib/action_controller/metal/live.rb +17 -55
- data/lib/action_controller/metal/mime_responds.rb +17 -37
- data/lib/action_controller/metal/params_wrapper.rb +8 -8
- data/lib/action_controller/metal/redirecting.rb +32 -9
- data/lib/action_controller/metal/renderers.rb +10 -8
- data/lib/action_controller/metal/rendering.rb +38 -6
- data/lib/action_controller/metal/request_forgery_protection.rb +67 -35
- data/lib/action_controller/metal/rescue.rb +2 -4
- data/lib/action_controller/metal/streaming.rb +4 -4
- data/lib/action_controller/metal/strong_parameters.rb +231 -78
- data/lib/action_controller/metal/testing.rb +1 -12
- data/lib/action_controller/metal/url_for.rb +12 -5
- data/lib/action_controller/renderer.rb +111 -0
- data/lib/action_controller/template_assertions.rb +9 -0
- data/lib/action_controller/test_case.rb +267 -363
- data/lib/action_dispatch.rb +2 -1
- data/lib/action_dispatch/http/cache.rb +23 -26
- data/lib/action_dispatch/http/filter_parameters.rb +6 -8
- data/lib/action_dispatch/http/filter_redirect.rb +7 -8
- data/lib/action_dispatch/http/headers.rb +28 -11
- data/lib/action_dispatch/http/mime_negotiation.rb +40 -26
- data/lib/action_dispatch/http/mime_type.rb +92 -61
- data/lib/action_dispatch/http/mime_types.rb +1 -4
- data/lib/action_dispatch/http/parameter_filter.rb +18 -8
- data/lib/action_dispatch/http/parameters.rb +45 -41
- data/lib/action_dispatch/http/request.rb +146 -82
- data/lib/action_dispatch/http/response.rb +180 -99
- data/lib/action_dispatch/http/url.rb +117 -8
- data/lib/action_dispatch/journey/formatter.rb +34 -28
- 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_extras.rb +4 -0
- data/lib/action_dispatch/journey/path/pattern.rb +37 -41
- data/lib/action_dispatch/journey/route.rb +71 -17
- data/lib/action_dispatch/journey/router.rb +5 -6
- data/lib/action_dispatch/journey/router/utils.rb +5 -5
- data/lib/action_dispatch/journey/routes.rb +14 -15
- data/lib/action_dispatch/journey/visitors.rb +86 -43
- data/lib/action_dispatch/middleware/cookies.rb +184 -135
- data/lib/action_dispatch/middleware/debug_exceptions.rb +115 -45
- data/lib/action_dispatch/middleware/exception_wrapper.rb +21 -20
- data/lib/action_dispatch/middleware/flash.rb +61 -45
- data/lib/action_dispatch/middleware/load_interlock.rb +21 -0
- data/lib/action_dispatch/middleware/params_parser.rb +30 -46
- data/lib/action_dispatch/middleware/public_exceptions.rb +2 -2
- data/lib/action_dispatch/middleware/reloader.rb +2 -4
- 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 +29 -23
- 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 +93 -36
- data/lib/action_dispatch/middleware/stack.rb +43 -48
- data/lib/action_dispatch/middleware/static.rb +52 -40
- data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +2 -14
- data/lib/action_dispatch/middleware/templates/rescues/{_source.erb → _source.html.erb} +0 -0
- 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 +0 -2
- data/lib/action_dispatch/request/session.rb +66 -34
- data/lib/action_dispatch/request/utils.rb +51 -19
- data/lib/action_dispatch/routing.rb +3 -8
- data/lib/action_dispatch/routing/inspector.rb +6 -30
- data/lib/action_dispatch/routing/mapper.rb +447 -322
- data/lib/action_dispatch/routing/polymorphic_routes.rb +8 -14
- data/lib/action_dispatch/routing/redirection.rb +3 -3
- data/lib/action_dispatch/routing/route_set.rb +124 -227
- data/lib/action_dispatch/routing/url_for.rb +27 -10
- data/lib/action_dispatch/testing/assertions.rb +1 -1
- data/lib/action_dispatch/testing/assertions/response.rb +27 -9
- data/lib/action_dispatch/testing/assertions/routing.rb +9 -9
- data/lib/action_dispatch/testing/integration.rb +237 -76
- data/lib/action_dispatch/testing/test_process.rb +5 -5
- data/lib/action_dispatch/testing/test_request.rb +12 -21
- data/lib/action_dispatch/testing/test_response.rb +1 -4
- data/lib/action_pack.rb +1 -1
- data/lib/action_pack/gem_version.rb +4 -4
- metadata +26 -25
- 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/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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b8eece084b0d46f0491133f5962fe75948897d38
|
4
|
+
data.tar.gz: 85bc45eacfb08495798916de51388ed289fd8c4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa4d4c43da0d0c86b545b6cb81da6363c3a8a9576d475550d1637de0b9f0d18bc59542680d7be1459a205ffe9ca25d8184f944c990e4ad3f354331dc2ca0efc8
|
7
|
+
data.tar.gz: cf96d44d85b60080df44c3c0d8a8d5526879afbcfcb685758ebeb822268a7c8e27654560aa9a68034ce1ca87a71eccf739de2958680eb674af5b1912e2635abe
|
data/CHANGELOG.md
CHANGED
@@ -1,121 +1,186 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 5.0.0.beta1 (December 18, 2015) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
|
6
|
+
* Deprecate `redirect_to :back` in favor of `redirect_back`, which accepts a
|
7
|
+
required `fallback_location` argument, thus eliminating the possibility of a
|
8
|
+
`RedirectBackError`.
|
7
9
|
|
8
|
-
*
|
10
|
+
*Derek Prior*
|
9
11
|
|
12
|
+
* Add `redirect_back` method to `ActionController::Redirecting` to provide a
|
13
|
+
way to safely redirect to the `HTTP_REFERER` if it is present, falling back
|
14
|
+
to a provided redirect otherwise.
|
10
15
|
|
11
|
-
|
16
|
+
*Derek Prior*
|
12
17
|
|
13
|
-
*
|
18
|
+
* `ActionController::TestCase` will be moved to it's own gem in Rails 5.1
|
14
19
|
|
20
|
+
With the speed improvements made to `ActionDispatch::IntegrationTest` we no
|
21
|
+
longer need to keep two separate code bases for testing controllers. In
|
22
|
+
Rails 5.1 `ActionController::TestCase` will be deprecated and moved into a
|
23
|
+
gem outside of Rails source.
|
15
24
|
|
16
|
-
|
25
|
+
This is a documentation deprecation so that going forward so new tests will use
|
26
|
+
`ActionDispatch::IntegrationTest` instead of `ActionController::TestCase`.
|
17
27
|
|
18
|
-
*
|
28
|
+
*Eileen M. Uchitelle*
|
19
29
|
|
30
|
+
* Add a `response_format` option to `ActionDispatch::DebugExceptions`
|
31
|
+
to configure the format of the response when errors occur in
|
32
|
+
development mode.
|
20
33
|
|
21
|
-
|
34
|
+
If `response_format` is `:default` the debug info will be rendered
|
35
|
+
in an HTML page. In the other hand, if the provided value is `:api`
|
36
|
+
the debug info will be rendered in the original response format.
|
22
37
|
|
23
|
-
*
|
38
|
+
*Jorge Bejar*
|
24
39
|
|
25
|
-
|
26
|
-
in a path was maintained. This was incorrectly backported to Rails 4.2 which
|
27
|
-
caused a regression.
|
40
|
+
* Change the `protect_from_forgery` prepend default to `false`
|
28
41
|
|
29
|
-
|
42
|
+
Per this comment
|
43
|
+
https://github.com/rails/rails/pull/18334#issuecomment-69234050 we want
|
44
|
+
`protect_from_forgery` to default to `prepend: false`.
|
30
45
|
|
31
|
-
|
46
|
+
`protect_from_forgery` will now be insterted into the callback chain at the
|
47
|
+
point it is called in your application. This is useful for cases where you
|
48
|
+
want to `protect_from_forgery` after you perform required authentication
|
49
|
+
callbacks or other callbacks that are required to run after forgery protection.
|
32
50
|
|
33
|
-
|
51
|
+
If you want `protect_from_forgery` callbacks to always run first, regardless of
|
52
|
+
position they are called in your application then you can add `prepend: true`
|
53
|
+
to your `protect_from_forgery` call.
|
34
54
|
|
35
|
-
|
36
|
-
and will match things like `:format_id` where there are nested resources, e.g:
|
55
|
+
Example:
|
37
56
|
|
38
|
-
```
|
39
|
-
|
40
|
-
resources :items
|
41
|
-
end
|
57
|
+
```ruby
|
58
|
+
protect_from_forgery prepend: true
|
42
59
|
```
|
43
60
|
|
44
|
-
|
45
|
-
`(.:format)`, `.:format` or `/` at the end of the path. Note that we need to
|
46
|
-
allow for multiple closing parenthesis since the route may be of this form:
|
47
|
-
|
48
|
-
``` ruby
|
49
|
-
get "/books(/:action(.:format))", controller: "books"
|
50
|
-
```
|
61
|
+
*Eileen M. Uchitelle*
|
51
62
|
|
52
|
-
|
53
|
-
|
63
|
+
* In url_for, never append a question mark to the URL when the query string
|
64
|
+
is empty anyway. (It used to do that when called like `url_for(controller:
|
65
|
+
'x', action: 'y', q: {})`.)
|
54
66
|
|
55
|
-
|
67
|
+
*Paul Grayson*
|
56
68
|
|
57
|
-
|
69
|
+
* Catch invalid UTF-8 querystring values and respond with BadRequest
|
58
70
|
|
71
|
+
Check querystring params for invalid UTF-8 characters, and raise an
|
72
|
+
ActionController::BadRequest error if present. Previously these strings
|
73
|
+
would typically trigger errors further down the stack.
|
59
74
|
|
60
|
-
|
75
|
+
*Grey Baker*
|
61
76
|
|
62
|
-
*
|
77
|
+
* Parse RSS/ATOM responses as XML, not HTML.
|
63
78
|
|
79
|
+
*Alexander Kaupanin*
|
64
80
|
|
65
|
-
|
81
|
+
* Show helpful message in `BadRequest` exceptions due to invalid path
|
82
|
+
parameter encodings.
|
66
83
|
|
67
|
-
|
84
|
+
Fixes #21923.
|
68
85
|
|
86
|
+
*Agis Anastasopoulos*
|
69
87
|
|
70
|
-
|
88
|
+
* Add the ability of returning arbitrary headers to ActionDispatch::Static
|
71
89
|
|
72
|
-
|
90
|
+
Now ActionDispatch::Static can accept HTTP headers so that developers
|
91
|
+
will have control of returning arbitrary headers like
|
92
|
+
'Access-Control-Allow-Origin' when a response is delivered. They can be
|
93
|
+
configured with `#config`:
|
73
94
|
|
95
|
+
config.public_file_server.headers = {
|
96
|
+
"Cache-Control" => "public, max-age=60",
|
97
|
+
"Access-Control-Allow-Origin" => "http://rubyonrails.org"
|
98
|
+
}
|
74
99
|
|
75
|
-
|
100
|
+
*Yuki Nishijima*
|
76
101
|
|
77
|
-
*
|
102
|
+
* Allow multiple `root` routes in same scope level. Example:
|
78
103
|
|
79
|
-
|
104
|
+
```ruby
|
105
|
+
root 'blog#show', constraints: ->(req) { Hostname.blog_site?(req.host) }
|
106
|
+
root 'landing#show'
|
107
|
+
```
|
108
|
+
*Rafael Sales*
|
80
109
|
|
81
|
-
|
110
|
+
* Fix regression in mounted engine named routes generation for app deployed to
|
111
|
+
a subdirectory. `relative_url_root` was prepended to the path twice (e.g.
|
112
|
+
"/subdir/subdir/engine_path" instead of "/subdir/engine_path")
|
82
113
|
|
114
|
+
Fixes #20920. Fixes #21459.
|
83
115
|
|
84
|
-
|
116
|
+
*Matthew Erhard*
|
85
117
|
|
86
|
-
*
|
118
|
+
* ActionDispatch::Response#new no longer applies default headers. If you want
|
119
|
+
default headers applied to the response object, then call
|
120
|
+
`ActionDispatch::Response.create`. This change only impacts people who are
|
121
|
+
directly constructing an `ActionDispatch::Response` object.
|
87
122
|
|
123
|
+
* Accessing mime types via constants like `Mime::HTML` is deprecated. Please
|
124
|
+
change code like this:
|
88
125
|
|
89
|
-
|
126
|
+
Mime::HTML
|
90
127
|
|
91
|
-
|
92
|
-
early in the `setup` chain.
|
128
|
+
To this:
|
93
129
|
|
94
|
-
|
130
|
+
Mime[:html]
|
95
131
|
|
96
|
-
|
132
|
+
This change is so that Rails will not manage a list of constants, and fixes
|
133
|
+
an issue where if a type isn't registered you could possibly get the wrong
|
134
|
+
object.
|
97
135
|
|
98
|
-
|
99
|
-
|
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")
|
103
|
-
|
104
|
-
Fixes #20920. Fixes #21459.
|
105
|
-
|
106
|
-
*Matthew Erhard*
|
136
|
+
`Mime[:html]` is available in older versions of Rails, too, so you can
|
137
|
+
safely change libraries and plugins and maintain compatibility with
|
138
|
+
multiple versions of Rails.
|
107
139
|
|
108
140
|
* `url_for` does not modify its arguments when generating polymorphic URLs.
|
109
141
|
|
110
142
|
*Bernerd Schaefer*
|
111
143
|
|
144
|
+
* Make it easier to opt in to `config.force_ssl` and `config.ssl_options` by
|
145
|
+
making them less dangerous to try and easier to disable.
|
146
|
+
|
147
|
+
SSL redirect:
|
148
|
+
* Move `:host` and `:port` options within `redirect: { … }`. Deprecate.
|
149
|
+
* Introduce `:status` and `:body` to customize the redirect response.
|
150
|
+
The 301 permanent default makes it difficult to test the redirect and
|
151
|
+
back out of it since browsers remember the 301. Test with a 302 or 307
|
152
|
+
instead, then switch to 301 once you're confident that all is well.
|
153
|
+
|
154
|
+
HTTP Strict Transport Security (HSTS):
|
155
|
+
* Shorter max-age. Shorten the default max-age from 1 year to 180 days,
|
156
|
+
the low end for https://www.ssllabs.com/ssltest/ grading and greater
|
157
|
+
than the 18-week minimum to qualify for browser preload lists.
|
158
|
+
* Disabling HSTS. Setting `hsts: false` now sets `hsts { expires: 0 }`
|
159
|
+
instead of omitting the header. Omitting does nothing to disable HSTS
|
160
|
+
since browsers hang on to your previous settings until they expire.
|
161
|
+
Sending `{ hsts: { expires: 0 }}` flushes out old browser settings and
|
162
|
+
actually disables HSTS:
|
163
|
+
http://tools.ietf.org/html/rfc6797#section-6.1.1
|
164
|
+
* HSTS Preload. Introduce `preload: true` to set the `preload` flag,
|
165
|
+
indicating that your site may be included in browser preload lists,
|
166
|
+
including Chrome, Firefox, Safari, IE11, and Edge. Submit your site:
|
167
|
+
https://hstspreload.appspot.com
|
168
|
+
|
169
|
+
*Jeremy Daer*
|
170
|
+
|
112
171
|
* Update `ActionController::TestSession#fetch` to behave more like
|
113
172
|
`ActionDispatch::Request::Session#fetch` when using non-string keys.
|
114
173
|
|
115
174
|
*Jeremy Friesen*
|
116
175
|
|
176
|
+
* Using strings or symbols for middleware class names is deprecated. Convert
|
177
|
+
things like this:
|
178
|
+
|
179
|
+
middleware.use "Foo::Bar"
|
180
|
+
|
181
|
+
to this:
|
117
182
|
|
118
|
-
|
183
|
+
middleware.use Foo::Bar
|
119
184
|
|
120
185
|
* ActionController::TestSession now accepts a default value as well as
|
121
186
|
a block for generating a default value based off the key provided.
|
@@ -126,565 +191,417 @@
|
|
126
191
|
|
127
192
|
*Matthew Gerrior*
|
128
193
|
|
129
|
-
* Fix
|
194
|
+
* Fix `ActionController::Parameters#fetch` overwriting `KeyError` returned by
|
195
|
+
default block.
|
130
196
|
|
131
|
-
|
132
|
-
So some headers will be broken if there are some middlewares
|
133
|
-
on `ActionDispatch::SSL` and if it uses `Rack::Utils::HeaderHash`.
|
197
|
+
*Jonas Schuber Erlandsson*, *Roque Pinel*
|
134
198
|
|
135
|
-
|
199
|
+
* `ActionController::Parameters` no longer inherits from
|
200
|
+
`HashWithIndifferentAccess`
|
136
201
|
|
202
|
+
Inheriting from `HashWithIndifferentAccess` allowed users to call any
|
203
|
+
enumerable methods on `Parameters` object, resulting in a risk of losing the
|
204
|
+
`permitted?` status or even getting back a pure `Hash` object instead of
|
205
|
+
a `Parameters` object with proper sanitization.
|
137
206
|
|
138
|
-
|
207
|
+
By not inheriting from `HashWithIndifferentAccess`, we are able to make
|
208
|
+
sure that all methods that are defined in `Parameters` object will return
|
209
|
+
a proper `Parameters` object with a correct `permitted?` flag.
|
139
210
|
|
140
|
-
*
|
141
|
-
nesting multiple routes.
|
142
|
-
|
143
|
-
See #18373.
|
144
|
-
|
145
|
-
*Ravil Bayramgalin*
|
146
|
-
|
147
|
-
* Fix regression where a gzip file response would have a Content-type,
|
148
|
-
even when it was a 304 status code.
|
211
|
+
*Prem Sichanugrist*
|
149
212
|
|
150
|
-
|
213
|
+
* Replaced `ActiveSupport::Concurrency::Latch` with `Concurrent::CountDownLatch`
|
214
|
+
from the concurrent-ruby gem.
|
151
215
|
|
152
|
-
*
|
216
|
+
*Jerry D'Antonio*
|
153
217
|
|
154
|
-
*
|
218
|
+
* Add ability to filter parameters based on parent keys.
|
155
219
|
|
156
|
-
|
157
|
-
|
158
|
-
|
220
|
+
# matches {credit_card: {code: "xxxx"}}
|
221
|
+
# doesn't match {file: { code: "xxxx"}}
|
222
|
+
config.filter_parameters += [ "credit_card.code" ]
|
159
223
|
|
160
|
-
|
161
|
-
|
162
|
-
* Fallback to `ENV['RAILS_RELATIVE_URL_ROOT']` in `url_for`.
|
224
|
+
See #13897.
|
163
225
|
|
164
|
-
|
165
|
-
prepended to the path when `url_for` is called. If `SCRIPT_NAME` (used by Rack)
|
166
|
-
is set, it takes precedence.
|
226
|
+
*Guillaume Malette*
|
167
227
|
|
168
|
-
|
228
|
+
* Deprecate passing first parameter as `Hash` and default status code for `head` method.
|
169
229
|
|
170
|
-
*
|
230
|
+
*Mehmet Emin İNAÇ*
|
171
231
|
|
172
|
-
*
|
173
|
-
|
232
|
+
* Adds`Rack::Utils::ParameterTypeError` and `Rack::Utils::InvalidParameterError`
|
233
|
+
to the rescue_responses hash in `ExceptionWrapper` (Rack recommends
|
234
|
+
integrators serve 400s for both of these).
|
174
235
|
|
175
|
-
|
236
|
+
*Grey Baker*
|
176
237
|
|
177
|
-
|
238
|
+
* Add support for API only apps.
|
239
|
+
ActionController::API is added as a replacement of
|
240
|
+
ActionController::Base for this kind of applications.
|
178
241
|
|
242
|
+
*Santiago Pastorino & Jorge Bejar*
|
179
243
|
|
180
|
-
|
244
|
+
* Remove `assigns` and `assert_template`. Both methods have been extracted
|
245
|
+
into a gem at https://github.com/rails/rails-controller-testing.
|
181
246
|
|
182
|
-
|
247
|
+
See #18950.
|
183
248
|
|
249
|
+
*Alan Guo Xiang Tan*
|
184
250
|
|
185
|
-
|
251
|
+
* `FileHandler` and `Static` middleware initializers accept `index` argument
|
252
|
+
to configure the directory index file name. Defaults to `index` (as in
|
253
|
+
`index.html`).
|
186
254
|
|
187
|
-
|
188
|
-
the masked token.
|
255
|
+
See #20017.
|
189
256
|
|
190
|
-
*
|
257
|
+
*Eliot Sykes*
|
191
258
|
|
192
|
-
*
|
259
|
+
* Deprecate `:nothing` option for `render` method.
|
193
260
|
|
194
|
-
|
195
|
-
request causing an incorrect behavior during the fall back to GET requests.
|
261
|
+
*Mehmet Emin İNAÇ*
|
196
262
|
|
197
|
-
|
198
|
-
|
199
|
-
draw do
|
200
|
-
get '/home' => 'test#index'
|
201
|
-
mount rack_app, at: '/'
|
202
|
-
end
|
203
|
-
head '/home'
|
204
|
-
assert_response :success
|
205
|
-
```
|
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.
|
263
|
+
* Fix `rake routes` not showing the right format when
|
264
|
+
nesting multiple routes.
|
209
265
|
|
210
|
-
|
266
|
+
See #18373.
|
211
267
|
|
212
|
-
*
|
268
|
+
*Ravil Bayramgalin*
|
213
269
|
|
214
|
-
|
215
|
-
lost when generating URLs with fewer positional arguments than parameters in
|
216
|
-
the route definition.
|
270
|
+
* Add ability to override default form builder for a controller.
|
217
271
|
|
218
|
-
|
272
|
+
class AdminController < ApplicationController
|
273
|
+
default_form_builder AdminFormBuilder
|
274
|
+
end
|
219
275
|
|
220
|
-
*
|
276
|
+
*Kevin McPhillips*
|
221
277
|
|
222
|
-
*
|
223
|
-
|
278
|
+
* For actions with no corresponding templates, render `head :no_content`
|
279
|
+
instead of raising an error. This allows for slimmer API controller
|
280
|
+
methods that simply work, without needing further instructions.
|
224
281
|
|
225
|
-
|
282
|
+
See #19036.
|
226
283
|
|
227
|
-
*
|
284
|
+
*Stephen Bussey*
|
228
285
|
|
229
|
-
|
230
|
-
payload data is not available.
|
286
|
+
* Provide friendlier access to request variants.
|
231
287
|
|
232
|
-
|
233
|
-
|
234
|
-
|
288
|
+
request.variant = :phone
|
289
|
+
request.variant.phone? # true
|
290
|
+
request.variant.tablet? # false
|
235
291
|
|
236
|
-
|
292
|
+
request.variant = [:phone, :tablet]
|
293
|
+
request.variant.phone? # true
|
294
|
+
request.variant.desktop? # false
|
295
|
+
request.variant.any?(:phone, :desktop) # true
|
296
|
+
request.variant.any?(:desktop, :watch) # false
|
237
297
|
|
238
|
-
*
|
298
|
+
*George Claghorn*
|
239
299
|
|
240
|
-
|
300
|
+
* Fix regression where a gzip file response would have a Content-type,
|
301
|
+
even when it was a 304 status code.
|
241
302
|
|
242
|
-
|
243
|
-
of returning a single space " ".
|
303
|
+
See #19271.
|
244
304
|
|
245
|
-
|
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.
|
305
|
+
*Kohei Suzuki*
|
249
306
|
|
250
|
-
|
307
|
+
* Fix handling of empty `X_FORWARDED_HOST` header in `raw_host_with_port`.
|
251
308
|
|
252
|
-
|
309
|
+
Previously, an empty `X_FORWARDED_HOST` header would cause
|
310
|
+
`Actiondispatch::Http:URL.raw_host_with_port` to return `nil`, causing
|
311
|
+
`Actiondispatch::Http:URL.host` to raise a `NoMethodError`.
|
253
312
|
|
254
|
-
*
|
313
|
+
*Adam Forsyth*
|
255
314
|
|
256
|
-
|
315
|
+
* Allow `Bearer` as token-keyword in `Authorization-Header`.
|
257
316
|
|
258
|
-
|
317
|
+
Aditionally to `Token`, the keyword `Bearer` is acceptable as a keyword
|
318
|
+
for the auth-token. The `Bearer` keyword is described in the original
|
319
|
+
OAuth RFC and used in libraries like Angular-JWT.
|
259
320
|
|
260
|
-
|
321
|
+
See #19094.
|
261
322
|
|
262
|
-
*
|
323
|
+
*Peter Schröder*
|
263
324
|
|
264
|
-
*
|
325
|
+
* Drop request class from RouteSet constructor.
|
265
326
|
|
266
|
-
|
327
|
+
If you would like to use a custom request class, please subclass and implement
|
328
|
+
the `request_class` method.
|
267
329
|
|
330
|
+
*tenderlove@ruby-lang.org*
|
268
331
|
|
269
|
-
|
332
|
+
* Fallback to `ENV['RAILS_RELATIVE_URL_ROOT']` in `url_for`.
|
270
333
|
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
object in Rails 5.0.
|
334
|
+
Fixed an issue where the `RAILS_RELATIVE_URL_ROOT` environment variable is not
|
335
|
+
prepended to the path when `url_for` is called. If `SCRIPT_NAME` (used by Rack)
|
336
|
+
is set, it takes precedence.
|
275
337
|
|
276
|
-
|
338
|
+
Fixes #5122.
|
277
339
|
|
278
|
-
*
|
279
|
-
prefix.
|
340
|
+
*Yasyf Mohamedali*
|
280
341
|
|
281
|
-
|
342
|
+
* Partitioning of routes is now done when the routes are being drawn. This
|
343
|
+
helps to decrease the time spent filtering the routes during the first request.
|
282
344
|
|
283
345
|
*Guo Xiang Tan*
|
284
346
|
|
285
|
-
*
|
286
|
-
|
287
|
-
Use symbols instead.
|
288
|
-
Fixes #16958.
|
347
|
+
* Fix regression in functional tests. Responses should have default headers
|
348
|
+
assigned.
|
289
349
|
|
290
|
-
|
350
|
+
See #18423.
|
291
351
|
|
292
|
-
*
|
352
|
+
*Jeremy Kemper*, *Yves Senn*
|
293
353
|
|
294
|
-
|
295
|
-
be
|
296
|
-
used instead.
|
354
|
+
* Deprecate AbstractController#skip_action_callback in favor of individual skip_callback methods
|
355
|
+
(which can be made to raise an error if no callback was removed).
|
297
356
|
|
298
|
-
|
357
|
+
*Iain Beeston*
|
299
358
|
|
300
|
-
|
359
|
+
* Alias the `ActionDispatch::Request#uuid` method to `ActionDispatch::Request#request_id`.
|
360
|
+
Due to implementation, `config.log_tags = [:request_id]` also works in substitute
|
361
|
+
for `config.log_tags = [:uuid]`.
|
301
362
|
|
302
|
-
*
|
363
|
+
*David Ilizarov*
|
303
364
|
|
304
|
-
|
305
|
-
|
306
|
-
|
365
|
+
* Change filter on /rails/info/routes to use an actual path regexp from rails
|
366
|
+
and not approximate javascript version. Oniguruma supports much more
|
367
|
+
extensive list of features than javascript regexp engine.
|
307
368
|
|
308
|
-
Fixes #
|
369
|
+
Fixes #18402.
|
309
370
|
|
310
|
-
*
|
371
|
+
*Ravil Bayramgalin*
|
311
372
|
|
312
|
-
*
|
313
|
-
|
373
|
+
* Non-string authenticity tokens do not raise NoMethodError when decoding
|
374
|
+
the masked token.
|
314
375
|
|
315
|
-
|
376
|
+
*Ville Lautanala*
|
316
377
|
|
317
|
-
|
318
|
-
|
319
|
-
explicit conversion and splatting with `#to_a`:
|
378
|
+
* Add `http_cache_forever` to Action Controller, so we can cache a response
|
379
|
+
that never gets expired.
|
320
380
|
|
321
|
-
|
381
|
+
*arthurnn*
|
322
382
|
|
323
|
-
|
383
|
+
* `ActionController#translate` supports symbols as shortcuts.
|
384
|
+
When a shortcut is given it also performs the lookup without the action
|
385
|
+
name.
|
324
386
|
|
325
|
-
*
|
387
|
+
*Max Melentiev*
|
326
388
|
|
327
|
-
|
328
|
-
|
389
|
+
* Expand `ActionController::ConditionalGet#fresh_when` and `stale?` to also
|
390
|
+
accept a collection of records as the first argument, so that the
|
391
|
+
following code can be written in a shorter form.
|
329
392
|
|
330
|
-
|
393
|
+
# Before
|
394
|
+
def index
|
395
|
+
@articles = Article.all
|
396
|
+
fresh_when(etag: @articles, last_modified: @articles.maximum(:updated_at))
|
397
|
+
end
|
331
398
|
|
332
|
-
|
333
|
-
|
399
|
+
# After
|
400
|
+
def index
|
401
|
+
@articles = Article.all
|
402
|
+
fresh_when(@articles)
|
403
|
+
end
|
334
404
|
|
335
|
-
|
405
|
+
*claudiob*
|
336
406
|
|
337
|
-
|
407
|
+
* Explicitly ignored wildcard verbs when searching for HEAD routes before fallback
|
338
408
|
|
339
|
-
|
409
|
+
Fixes an issue where a mounted rack app at root would intercept the HEAD
|
410
|
+
request causing an incorrect behavior during the fall back to GET requests.
|
340
411
|
|
341
412
|
Example:
|
342
413
|
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
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.
|
353
|
-
|
354
|
-
*Guo Xiang Tan*, *Andrew White*
|
355
|
-
|
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.
|
359
|
-
|
360
|
-
*Richard Schneeman*
|
361
|
-
|
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.
|
366
|
-
|
367
|
-
*Prem Sichanugrist*
|
368
|
-
|
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`.
|
375
|
-
|
376
|
-
params = ActionController::Parameters.new({
|
377
|
-
name: 'Senjougahara Hitagi',
|
378
|
-
oddity: 'Heavy stone crab'
|
379
|
-
})
|
380
|
-
params.to_h
|
381
|
-
# => {}
|
382
|
-
|
383
|
-
unsafe_params = params.dup.permit!
|
384
|
-
unsafe_params.to_h
|
385
|
-
# => {"name"=>"Senjougahara Hitagi", "oddity"=>"Heavy stone crab"}
|
386
|
-
|
387
|
-
safe_params = params.permit(:name)
|
388
|
-
safe_params.to_h
|
389
|
-
# => {"name"=>"Senjougahara Hitagi"}
|
390
|
-
|
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.
|
394
|
-
|
395
|
-
*Prem Sichanugrist*
|
396
|
-
|
397
|
-
* Deprecated `TagAssertions`.
|
398
|
-
|
399
|
-
*Kasper Timm Hansen*
|
400
|
-
|
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.
|
404
|
-
|
405
|
-
Fixes #16520.
|
406
|
-
|
407
|
-
*Godfrey Chan*
|
408
|
-
|
409
|
-
* Add `config.action_dispatch.cookies_digest` option for setting custom
|
410
|
-
digest. The default remains the same - 'SHA1'.
|
411
|
-
|
412
|
-
*Łukasz Strzałkowski*
|
413
|
-
|
414
|
-
* Move `respond_with` (and the class-level `respond_to`) to
|
415
|
-
the `responders` gem.
|
416
|
-
|
417
|
-
*José Valim*
|
418
|
-
|
419
|
-
* When your templates change, browser caches bust automatically.
|
420
|
-
|
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.
|
425
|
-
|
426
|
-
If you render a different template, you can now pass the `:template`
|
427
|
-
option to include its digest instead:
|
428
|
-
|
429
|
-
fresh_when @post, template: 'widgets/show'
|
430
|
-
|
431
|
-
Pass `template: false` to skip the lookup. To turn this off entirely, set:
|
432
|
-
|
433
|
-
config.action_controller.etag_with_template_digest = false
|
434
|
-
|
435
|
-
*Jeremy Kemper*
|
436
|
-
|
437
|
-
* Remove deprecated `AbstractController::Helpers::ClassMethods::MissingHelperError`
|
438
|
-
in favor of `AbstractController::Helpers::MissingHelperError`.
|
439
|
-
|
440
|
-
*Yves Senn*
|
441
|
-
|
442
|
-
* Fix `assert_template` not being able to assert that no files were rendered.
|
443
|
-
|
444
|
-
*Guo Xiang Tan*
|
445
|
-
|
446
|
-
* Extract source code for the entire exception stack trace for
|
447
|
-
better debugging and diagnosis.
|
448
|
-
|
449
|
-
*Ryan Dao*
|
450
|
-
|
451
|
-
* Allows ActionDispatch::Request::LOCALHOST to match any IPv4 127.0.0.0/8
|
452
|
-
loopback address.
|
453
|
-
|
454
|
-
*Earl St Sauver*, *Sven Riedel*
|
455
|
-
|
456
|
-
* Preserve original path in `ShowExceptions` middleware by stashing it as
|
457
|
-
`env["action_dispatch.original_path"]`
|
458
|
-
|
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"]`.
|
464
|
-
|
465
|
-
*Grey Baker*
|
466
|
-
|
467
|
-
* Use `String#bytesize` instead of `String#size` when checking for cookie
|
468
|
-
overflow.
|
469
|
-
|
470
|
-
*Agis Anastasopoulos*
|
471
|
-
|
472
|
-
* `render nothing: true` or rendering a `nil` body no longer add a single
|
473
|
-
space to the response body.
|
474
|
-
|
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.
|
479
|
-
|
480
|
-
Use `render body: ' '` if the old behavior is desired.
|
481
|
-
|
482
|
-
See #14883 for details.
|
483
|
-
|
484
|
-
*Godfrey Chan*
|
485
|
-
|
486
|
-
* Prepend a JS comment to JSONP callbacks. Addresses CVE-2014-4671
|
487
|
-
("Rosetta Flash").
|
488
|
-
|
489
|
-
*Greg Campbell*
|
414
|
+
draw do
|
415
|
+
get '/home' => 'test#index'
|
416
|
+
mount rack_app, at: '/'
|
417
|
+
end
|
418
|
+
head '/home'
|
419
|
+
assert_response :success
|
490
420
|
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
URI.parser.unescape in active_support/core_ext/uri.rb.
|
495
|
-
|
496
|
-
Fixes #16104.
|
497
|
-
|
498
|
-
*Karl Entwistle*
|
499
|
-
|
500
|
-
* Generate shallow paths for all children of shallow resources.
|
501
|
-
|
502
|
-
Fixes #15783.
|
421
|
+
In this case, a HEAD request runs through the routes the first time and fails
|
422
|
+
to match anything. Then, it runs through the list with the fallback and matches
|
423
|
+
`get '/home'`. The original behavior would match the rack app in the first pass.
|
503
424
|
|
504
|
-
*
|
425
|
+
*Terence Sun*
|
505
426
|
|
506
|
-
*
|
507
|
-
|
427
|
+
* Migrating xhr methods to keyword arguments syntax
|
428
|
+
in `ActionController::TestCase` and `ActionDispatch::Integration`
|
508
429
|
|
509
|
-
|
430
|
+
Old syntax:
|
510
431
|
|
511
|
-
|
432
|
+
xhr :get, :create, params: { id: 1 }
|
512
433
|
|
513
|
-
|
514
|
-
parameters are permitted globally. The default value of this configuration is
|
515
|
-
`['controller', 'action']`.
|
434
|
+
New syntax example:
|
516
435
|
|
517
|
-
|
436
|
+
get :create, params: { id: 1 }, xhr: true
|
518
437
|
|
519
|
-
*
|
438
|
+
*Kir Shatrov*
|
520
439
|
|
521
|
-
|
440
|
+
* Migrating to keyword arguments syntax in `ActionController::TestCase` and
|
441
|
+
`ActionDispatch::Integration` HTTP request methods.
|
522
442
|
|
523
|
-
|
443
|
+
Example:
|
524
444
|
|
525
|
-
|
445
|
+
post :create, params: { y: x }, session: { a: 'b' }
|
446
|
+
get :view, params: { id: 1 }
|
447
|
+
get :view, params: { id: 1 }, format: :json
|
526
448
|
|
527
|
-
|
449
|
+
*Kir Shatrov*
|
528
450
|
|
529
|
-
|
451
|
+
* Preserve default url options when generating URLs.
|
530
452
|
|
531
|
-
|
532
|
-
|
453
|
+
Fixes an issue that would cause `default_url_options` to be lost when
|
454
|
+
generating URLs with fewer positional arguments than parameters in the
|
455
|
+
route definition.
|
533
456
|
|
534
|
-
|
457
|
+
*Tekin Suleyman*
|
535
458
|
|
536
|
-
|
459
|
+
* Deprecate `*_via_redirect` integration test methods.
|
537
460
|
|
538
|
-
|
539
|
-
during live streaming, even when the controller is blocked on a write.
|
461
|
+
Use `follow_redirect!` manually after the request call for the same behavior.
|
540
462
|
|
541
|
-
*
|
463
|
+
*Aditya Kapoor*
|
542
464
|
|
543
|
-
*
|
544
|
-
|
545
|
-
Use of a string without a "#" should be replaced with `controller: string`.
|
465
|
+
* Add `ActionController::Renderer` to render arbitrary templates
|
466
|
+
outside controller actions.
|
546
467
|
|
547
|
-
|
468
|
+
Its functionality is accessible through class methods `render` and
|
469
|
+
`renderer` of `ActionController::Base`.
|
548
470
|
|
549
|
-
*
|
550
|
-
a trailing slash after `.:format`
|
471
|
+
*Ravil Bayramgalin*
|
551
472
|
|
552
|
-
|
473
|
+
* Support `:assigns` option when rendering with controllers/mailers.
|
553
474
|
|
554
|
-
*
|
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.
|
475
|
+
*Ravil Bayramgalin*
|
559
476
|
|
560
|
-
|
477
|
+
* Default headers, removed in controller actions, are no longer reapplied on
|
478
|
+
the test response.
|
561
479
|
|
562
|
-
*
|
563
|
-
called 'status' in a controller.
|
480
|
+
*Jonas Baumann*
|
564
481
|
|
565
|
-
|
482
|
+
* Deprecate all `*_filter` callbacks in favor of `*_action` callbacks.
|
566
483
|
|
567
|
-
*
|
484
|
+
*Rafael Mendonça França*
|
568
485
|
|
569
|
-
*
|
486
|
+
* Allow you to pass `prepend: false` to `protect_from_forgery` to have the
|
487
|
+
verification callback appended instead of prepended to the chain.
|
488
|
+
This allows you to let the verification step depend on prior callbacks.
|
570
489
|
|
571
|
-
|
490
|
+
Example:
|
572
491
|
|
573
|
-
|
492
|
+
class ApplicationController < ActionController::Base
|
493
|
+
before_action :authenticate
|
494
|
+
protect_from_forgery prepend: false, unless: -> { @authenticated_by.oauth? }
|
574
495
|
|
575
|
-
|
576
|
-
|
577
|
-
|
496
|
+
private
|
497
|
+
def authenticate
|
498
|
+
if oauth_request?
|
499
|
+
# authenticate with oauth
|
500
|
+
@authenticated_by = 'oauth'.inquiry
|
501
|
+
else
|
502
|
+
# authenticate with cookies
|
503
|
+
@authenticated_by = 'cookie'.inquiry
|
504
|
+
end
|
505
|
+
end
|
506
|
+
end
|
578
507
|
|
579
|
-
*
|
508
|
+
*Josef Šimánek*
|
580
509
|
|
581
|
-
*
|
510
|
+
* Remove `ActionController::HideActions`.
|
582
511
|
|
583
|
-
|
512
|
+
*Ravil Bayramgalin*
|
584
513
|
|
585
|
-
|
514
|
+
* Remove `respond_to`/`respond_with` placeholder methods, this functionality
|
515
|
+
has been extracted to the `responders` gem.
|
586
516
|
|
587
|
-
*
|
588
|
-
and improved tests.
|
517
|
+
*Carlos Antonio da Silva*
|
589
518
|
|
590
|
-
|
519
|
+
* Remove deprecated assertion files.
|
591
520
|
|
592
|
-
*
|
521
|
+
*Rafael Mendonça França*
|
593
522
|
|
594
|
-
*
|
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.
|
523
|
+
* Remove deprecated usage of string keys in URL helpers.
|
598
524
|
|
599
|
-
*
|
525
|
+
*Rafael Mendonça França*
|
600
526
|
|
601
|
-
*
|
602
|
-
purposes of remote IP detection. Also handle uppercase private IPv6
|
603
|
-
addresses.
|
527
|
+
* Remove deprecated `only_path` option on `*_path` helpers.
|
604
528
|
|
605
|
-
|
529
|
+
*Rafael Mendonça França*
|
606
530
|
|
607
|
-
|
531
|
+
* Remove deprecated `NamedRouteCollection#helpers`.
|
608
532
|
|
609
|
-
*
|
533
|
+
*Rafael Mendonça França*
|
610
534
|
|
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.
|
535
|
+
* Remove deprecated support to define routes with `:to` option that doesn't contain `#`.
|
614
536
|
|
615
|
-
|
616
|
-
`TypeError: incompatible marshal file format` and a 500 error for the user.
|
537
|
+
*Rafael Mendonça França*
|
617
538
|
|
618
|
-
|
539
|
+
* Remove deprecated `ActionDispatch::Response#to_ary`.
|
619
540
|
|
620
|
-
*
|
541
|
+
*Rafael Mendonça França*
|
621
542
|
|
622
|
-
*
|
543
|
+
* Remove deprecated `ActionDispatch::Request#deep_munge`.
|
623
544
|
|
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
|
545
|
+
*Rafael Mendonça França*
|
628
546
|
|
629
|
-
|
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.
|
547
|
+
* Remove deprecated `ActionDispatch::Http::Parameters#symbolized_path_parameters`.
|
633
548
|
|
634
|
-
|
549
|
+
*Rafael Mendonça França*
|
635
550
|
|
636
|
-
|
551
|
+
* Remove deprecated option `use_route` in controller tests.
|
637
552
|
|
638
|
-
*
|
639
|
-
`ActionDispatch::Http::UploadedFile#tempfile`.
|
553
|
+
*Rafael Mendonça França*
|
640
554
|
|
641
|
-
|
555
|
+
* Ensure `append_info_to_payload` is called even if an exception is raised.
|
642
556
|
|
643
|
-
|
644
|
-
|
557
|
+
Fixes an issue where when an exception is raised in the request the additional
|
558
|
+
payload data is not available.
|
645
559
|
|
646
|
-
|
560
|
+
See:
|
561
|
+
* #14903
|
562
|
+
* https://github.com/roidrage/lograge/issues/37
|
647
563
|
|
648
|
-
*
|
564
|
+
*Dieter Komendera*, *Margus Pärt*
|
649
565
|
|
650
|
-
*
|
566
|
+
* Correctly rely on the response's status code to handle calls to `head`.
|
651
567
|
|
652
|
-
*
|
568
|
+
*Robin Dupret*
|
653
569
|
|
654
|
-
*
|
570
|
+
* Using `head` method returns empty response_body instead
|
571
|
+
of returning a single space " ".
|
655
572
|
|
656
|
-
|
573
|
+
The old behavior was added as a workaround for a bug in an early
|
574
|
+
version of Safari, where the HTTP headers are not returned correctly
|
575
|
+
if the response body has a 0-length. This is been fixed since and
|
576
|
+
the workaround is no longer necessary.
|
657
577
|
|
658
|
-
|
578
|
+
Fixes #18253.
|
659
579
|
|
660
|
-
*
|
580
|
+
*Prathamesh Sonpatki*
|
661
581
|
|
662
|
-
|
582
|
+
* Fix how polymorphic routes works with objects that implement `to_model`.
|
663
583
|
|
664
|
-
*
|
665
|
-
proper values were printed correctly.
|
584
|
+
*Travis Grathwell*
|
666
585
|
|
667
|
-
|
586
|
+
* Stop converting empty arrays in `params` to `nil`.
|
668
587
|
|
669
|
-
|
588
|
+
This behavior was introduced in response to CVE-2012-2660, CVE-2012-2694
|
589
|
+
and CVE-2013-0155
|
670
590
|
|
671
|
-
|
672
|
-
|
673
|
-
|
591
|
+
ActiveRecord now issues a safe query when passing an empty array into
|
592
|
+
a where clause, so there is no longer a need to defend against this type
|
593
|
+
of input (any nils are still stripped from the array).
|
674
594
|
|
675
|
-
|
595
|
+
*Chris Sinjakli*
|
676
596
|
|
677
|
-
|
597
|
+
* Fixed usage of optional scopes in url helpers.
|
678
598
|
|
679
|
-
*
|
680
|
-
`log_warning_on_csrf_failure` configuration setting in
|
681
|
-
`ActionController::RequestForgeryProtection`.
|
599
|
+
*Alex Robbin*
|
682
600
|
|
683
|
-
|
601
|
+
* Fixed handling of positional url helper arguments when `format: false`.
|
684
602
|
|
685
|
-
|
686
|
-
`default_url_options` methods.
|
603
|
+
Fixes #17819.
|
687
604
|
|
688
|
-
*
|
605
|
+
*Andrew White*, *Tatiana Soukiassian*
|
689
606
|
|
690
|
-
Please check [4-
|
607
|
+
Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionpack/CHANGELOG.md) for previous changes.
|