2017-01-03 21:11:14 -05:00
* Remove deprecated `ActionController::Metal.call` .
*Rafael Mendonça França*
2017-01-03 21:07:03 -05:00
* Remove deprecated `ActionController::Metal#env` .
2017-01-03 20:50:55 -05:00
*Rafael Mendonça França*
2016-12-21 11:08:46 -05:00
* Make `with_routing` test helper work when testing controllers inheriting from `ActionController::API`
*Julia López*
2016-11-23 16:24:35 -05:00
* Use accept header in integration tests with `as: :json`
2016-12-27 08:43:38 -05:00
Instead of appending the `format` to the request path, Rails will figure
2016-11-23 16:24:35 -05:00
out the format from the header instead.
This allows devs to use `:as` on routes that don't have a format.
2016-12-27 08:32:03 -05:00
2016-11-23 16:24:35 -05:00
Fixes #27144 .
*Kasper Timm Hansen*
2016-12-27 08:43:38 -05:00
* Reset a new session directly after its creation in `ActionDispatch::IntegrationTest#open_session` .
2016-11-19 01:08:16 -05:00
Fixes #22742 .
*Tawan Sierek*
2016-11-18 17:36:13 -05:00
* Fixes incorrect output from rails routes when using singular resources.
2016-11-17 17:32:49 -05:00
2016-11-18 17:36:13 -05:00
Fixes #26606 .
2016-11-17 17:32:49 -05:00
*Erick Reyna*
2016-11-18 17:36:13 -05:00
2016-11-17 17:32:49 -05:00
* Fixes multiple calls to `logger.fatal` instead of a single call,
for every line in an exception backtrace, when printing trace
2016-08-19 10:08:26 -04:00
from `DebugExceptions` middleware.
2016-11-17 17:32:49 -05:00
2016-11-18 17:36:13 -05:00
Fixes #26134 .
2016-08-19 10:08:26 -04:00
*Vipul A M*
2016-11-17 17:32:49 -05:00
2016-11-08 03:58:58 -05:00
* Add support for arbitrary hashes in strong parameters:
```ruby
params.permit(preferences: {})
```
*Xavier Noria*
2016-10-17 19:17:54 -04:00
* Add `ActionController::Parameters#merge!` , which behaves the same as `Hash#merge!` .
*Yuji Yaginuma*
2016-11-12 13:14:49 -05:00
* Allow keys not found in `RACK_KEY_TRANSLATION` for setting the environment when rendering
2016-10-13 18:53:41 -04:00
arbitrary templates.
*Sammy Larbi*
2016-10-10 00:06:04 -04:00
* Remove deprecated support to non-keyword arguments in `ActionDispatch::IntegrationTest#process` ,
`#get` , `#post` , `#patch` , `#put` , `#delete` , and `#head` .
*Rafael Mendonça França*
2016-07-28 00:05:05 -04:00
* Remove deprecated `ActionDispatch::IntegrationTest#*_via_redirect` .
*Rafael Mendonça França*
2016-07-27 23:57:57 -04:00
* Remove deprecated `ActionDispatch::IntegrationTest#xml_http_request` .
*Rafael Mendonça França*
2016-10-11 15:37:33 -04:00
* Remove deprecated support for passing `:path` and route path as strings in `ActionDispatch::Routing::Mapper#match` .
2016-07-27 23:42:33 -04:00
*Rafael Mendonça França*
* Remove deprecated support for passing path as `nil` in `ActionDispatch::Routing::Mapper#match` .
2016-07-27 23:27:32 -04:00
*Rafael Mendonça França*
2016-06-19 21:44:23 -04:00
* Remove deprecated `cache_control` argument from `ActionDispatch::Static#initialize` .
*Rafael Mendonça França*
2016-06-19 21:41:11 -04:00
* Remove deprecated support to passing strings or symbols to the middleware stack.
*Rafael Mendonça França*
2016-06-19 21:35:59 -04:00
* Change HSTS subdomain to true.
*Rafael Mendonça França*
* Remove deprecated `host` and `port` ssl options.
*Rafael Mendonça França*
2016-06-19 21:15:01 -04:00
* Remove deprecated `const_error` argument in
`ActionDispatch::Session::SessionRestoreError#initialize` .
*Rafael Mendonça França*
* Remove deprecated `#original_exception` in `ActionDispatch::Session::SessionRestoreError` .
*Rafael Mendonça França*
2016-06-19 21:09:41 -04:00
* Deprecate `ActionDispatch::ParamsParser::ParseError` in favor of
`ActionDispatch::Http::Parameters::ParseError` .
*Rafael Mendonça França*
2016-06-19 20:56:23 -04:00
* Remove deprecated `ActionDispatch::ParamsParser` .
*Rafael Mendonça França*
2016-06-19 20:49:52 -04:00
* Remove deprecated `original_exception` and `message` arguments in
`ActionDispatch::ParamsParser::ParseError#initialize` .
*Rafael Mendonça França*
* Remove deprecated `#original_exception` in `ActionDispatch::ParamsParser::ParseError` .
*Rafael Mendonça França*
2016-06-19 20:41:15 -04:00
* Remove deprecated access to mime types through constants.
*Rafael Mendonça França*
2016-05-23 18:36:58 -04:00
* Remove deprecated support to non-keyword arguments in `ActionController::TestCase#process` ,
`#get` , `#post` , `#patch` , `#put` , `#delete` , and `#head` .
*Rafael Mendonça França*
2016-05-23 17:45:09 -04:00
* Remove deprecated `xml_http_request` and `xhr` methods in `ActionController::TestCase` .
*Rafael Mendonça França*
2016-05-23 17:40:52 -04:00
* Remove deprecated methods in `ActionController::Parameters` .
*Rafael Mendonça França*
2016-05-23 17:36:13 -04:00
* Remove deprecated support to comparing a `ActionController::Parameters`
with a `Hash` .
*Rafael Mendonça França*
2016-05-21 08:49:38 -04:00
* Remove deprecated support to `:text` in `render` .
*Rafael Mendonça França*
2016-05-21 08:25:28 -04:00
* Remove deprecated support to `:nothing` in `render` .
*Rafael Mendonça França*
2016-05-10 03:59:29 -04:00
* Remove deprecated support to `:back` in `redirect_to` .
*Rafael Mendonça França*
2016-05-10 03:54:17 -04:00
* Remove deprecated support to passing status as option `head` .
*Rafael Mendonça França*
2016-05-10 03:13:49 -04:00
* Remove deprecated support to passing original exception to `ActionController::BadRequest`
and the `ActionController::BadRequest#original_exception` method.
*Rafael Mendonça França*
Remove deprecated methods related to controller filters
`skip_action_callback`, `skip_filter`, `before_filter`,
`prepend_before_filter`, `skip_before_filter`,
`append_before_filter`, `around_filter`
`prepend_around_filter`, `skip_around_filter`,
`append_around_filter`, `after_filter`,
`prepend_after_filter`, `skip_after_filter` and
`append_after_filter`.
2016-05-10 03:08:05 -04:00
* Remove deprecated methods `skip_action_callback` , `skip_filter` , `before_filter` ,
`prepend_before_filter` , `skip_before_filter` , `append_before_filter` , `around_filter`
`prepend_around_filter` , `skip_around_filter` , `append_around_filter` , `after_filter` ,
`prepend_after_filter` , `skip_after_filter` and `append_after_filter` .
*Rafael Mendonça França*
2016-09-20 05:42:26 -04:00
* Show an "unmatched constraints" error when params fail to match constraints
on a matched route, rather than a "missing keys" error.
Fixes #26470 .
*Chris Carter*
2016-09-22 19:17:03 -04:00
* Fix adding implicitly rendered template digests to ETags.
Fixes a case when modifying an implicitly rendered template for a
controller action using `fresh_when` or `stale?` would not result in a new
`ETag` value.
*Javan Makhmali*
2016-09-03 02:17:05 -04:00
* Make `fixture_file_upload` work in integration tests.
*Yuji Yaginuma*
2016-08-31 15:39:15 -04:00
* Add `to_param` to `ActionController::Parameters` deprecations.
In the future `ActionController::Parameters` are discouraged from being used
in URLs without explicit whitelisting. Go through `to_h` to use `to_param` .
*Kir Shatrov*
2016-08-29 11:24:51 -04:00
* Fix nested multiple roots
The PR #20940 enabled the use of multiple roots with different constraints
at the top level but unfortunately didn't work when those roots were inside
a namespace and also broke the use of root inside a namespace after a top
level root was defined because the check for the existence of the named route
used the global :root name and not the namespaced name.
This is fixed by using the name_for_action method to expand the :root name to
the full namespaced name. We can pass nil for the second argument as we're not
dealing with resource definitions so don't need to handle the cases for edit
and new routes.
Fixes #26148 .
*Ryo Hashimoto* , *Andrew White*
2016-08-22 16:34:35 -04:00
* Include the content of the flash in the auto-generated etag. This solves the following problem:
1. POST /messages
2. redirect_to messages_url, notice: 'Message was created'
3. GET /messages/1
4. GET /messages
2016-08-29 11:24:51 -04:00
2016-08-22 16:34:35 -04:00
Step 4 would before still include the flash message, even though it's no longer relevant,
because the etag cache was recorded with the flash in place and didn't change when it was gone.
*DHH*
2016-02-28 05:26:12 -05:00
* SSL: Changes redirect behavior for all non-GET and non-HEAD requests
(like POST/PUT/PATCH etc) to `http://` resources to redirect to `https://`
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 ).
307 status code instructs the HTTP clients to preserve the original
request method while redirecting. It has been part of HTTP RFC since
1999 and is implemented/recognized by most (if not all) user agents.
# Before
POST http://example.com/articles (i.e. ArticlesContoller#create)
redirects to
GET https://example.com/articles (i.e. ArticlesContoller#index)
# After
POST http://example.com/articles (i.e. ArticlesContoller#create)
redirects to
POST https://example.com/articles (i.e. ArticlesContoller#create)
*Chirag Singhal*
2016-08-18 14:00:38 -04:00
* Add `:as` option to `ActionController:TestCase#process` and related methods.
2016-08-19 00:48:56 -04:00
Specifying `as: mime_type` allows the `CONTENT_TYPE` header to be specified
in controller tests without manually doing this through `@request.headers['CONTENT_TYPE']` .
*Everest Stefan Munro-Zeisberger*
2016-08-18 14:00:38 -04:00
2016-08-07 13:15:11 -04:00
* Show cache hits and misses when rendering partials.
Partials using the `cache` helper will show whether a render hit or missed
the cache:
```
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
```
This removes the need for the old fragment cache logging:
```
Read fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/d0bdf2974e1ef6d31685c3b392ad0b74 (0.6ms)
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
Write fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/3b4e249ac9d168c617e32e84b99218b5 (1.1ms)
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
```
Though that full output can be reenabled with
`config.action_controller.enable_fragment_cache_logging = true` .
*Stan Lo*
2016-07-31 03:05:08 -04:00
* Don't override the `Accept` header in integration tests when called with `xhr: true` .
Fixes #25859 .
*David Chen*
2016-08-10 00:02:22 -04:00
* Fix `defaults` option for root route.
2016-07-21 17:10:42 -04:00
A regression from some refactoring for the 5.0 release, this change
2016-08-10 00:02:22 -04:00
fixes the use of `defaults` (default parameters) in the `root` routing method.
2016-07-21 17:10:42 -04:00
*Chris Arcand*
2016-07-10 12:43:12 -04:00
* Check `request.path_parameters` encoding at the point they're set.
2016-07-13 13:44:04 -04:00
Check for any non-UTF8 characters in path parameters at the point they're
set in `env` . Previously they were checked for when used to get a controller
class, but this meant routes that went directly to a Rack app, or skipped
controller instantiation for some other reason, had to defend against
non-UTF8 characters themselves.
*Grey Baker*
2016-08-10 00:02:22 -04:00
* Don't raise `ActionController::UnknownHttpMethod` from `ActionDispatch::Static` .
Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static
The `ActionDispatch::Static` middleware is used low down in the stack to serve
static assets before doing much processing. Since it's called from so low in
the stack, we don't have access to the request ID at this point, and generally
won't have any exception handling defined (by default `ShowExceptions` is added
to the stack quite a bit higher and relies on logging and request ID).
Before https://github.com/rails/rails/commit/8f27d6036a2ddc3cb7a7ad98afa2666ec163c2c3
this middleware would ignore unknown HTTP methods, and an exception about these
would be raised higher in the stack. After that commit, however, that exception
will be raised here.
If we want to keep `ActionDispatch::Static` so low in the stack (I think we do)
we should suppress the `ActionController::UnknownHttpMethod` exception here,
and instead let it be raised higher up the stack, once we've had a chance to
define exception handling behaviour.
This PR updates `ActionDispatch::Static` so it passes `Rack::Request` objects to
`ActionDispatch::FileHandler`, which won't raise an
`ActionController::UnknownHttpMethod` error. If an unknown method is
passed, it should exception higher in the stack instead, once we've had a
chance to define exception handling behaviour.`
2016-07-12 07:34:21 -04:00
Pass `Rack::Request` objects to `ActionDispatch::FileHandler` to avoid it
raising `ActionController::UnknownHttpMethod` . If an unknown method is
2016-08-10 00:02:22 -04:00
passed, it should pass exception higher in the stack instead, once we've had a
Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static
The `ActionDispatch::Static` middleware is used low down in the stack to serve
static assets before doing much processing. Since it's called from so low in
the stack, we don't have access to the request ID at this point, and generally
won't have any exception handling defined (by default `ShowExceptions` is added
to the stack quite a bit higher and relies on logging and request ID).
Before https://github.com/rails/rails/commit/8f27d6036a2ddc3cb7a7ad98afa2666ec163c2c3
this middleware would ignore unknown HTTP methods, and an exception about these
would be raised higher in the stack. After that commit, however, that exception
will be raised here.
If we want to keep `ActionDispatch::Static` so low in the stack (I think we do)
we should suppress the `ActionController::UnknownHttpMethod` exception here,
and instead let it be raised higher up the stack, once we've had a chance to
define exception handling behaviour.
This PR updates `ActionDispatch::Static` so it passes `Rack::Request` objects to
`ActionDispatch::FileHandler`, which won't raise an
`ActionController::UnknownHttpMethod` error. If an unknown method is
passed, it should exception higher in the stack instead, once we've had a
chance to define exception handling behaviour.`
2016-07-12 07:34:21 -04:00
chance to define exception handling behaviour.
*Grey Baker*
2016-08-10 00:02:22 -04:00
* Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper` .
2016-07-12 11:41:09 -04:00
Updated `ActionDispatch::ExceptionWrapper` to handle the Rack 2.0 namespace
for `ParameterTypeError` and `InvalidParameterError` errors.
*Grey Baker*
2016-05-06 17:54:40 -04:00
2016-05-10 00:07:09 -04:00
Please check [5-0-stable ](https://github.com/rails/rails/blob/5-0-stable/actionpack/CHANGELOG.md ) for previous changes.