aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Allow any key in Renderer environment hashSammy Larbi2016-10-151-0/+5
| | | | | | When rendering arbitrary templates, it is helpful to not overwrite `env` keys with nil if they don't match any found in the `RACK_KEY_TRANSLATION` This allows the developer to set the environment to exactly what is needed for rendering.
* [ci skip] fix typo in Actionpack ChangelogAlex Kitchens2016-10-111-1/+1
|
* Remove deprecated support to non-keyword arguments in ↵Rafael Mendonça França2016-10-101-0/+5
| | | | | | `ActionDispatch::IntegrationTest`, `#process`, `#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head`.
* Remove deprecated `ActionDispatch::IntegrationTest#*_via_redirect`.Rafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated `ActionDispatch::IntegrationTest#xml_http_request`Rafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated support for passing `:path` and route path as stings in ↵Rafael Mendonça França2016-10-101-1/+5
| | | | `ActionDispatch::Routing::Mapper#match`
* Remove deprecated support passing path as `nil` in ↵Rafael Mendonça França2016-10-101-0/+4
| | | | `ActionDispatch::Routing::Mapper#match`
* Remove deprecated `cache_control` argument from ↵Rafael Mendonça França2016-10-101-0/+4
| | | | `ActionDispatch::Static#initialize`
* Remove deprecated support to passing strings to the middleware stackRafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated code in ssl middlewareRafael Mendonça França2016-10-101-0/+8
|
* Remove deprecated code in ActionDispatch::Session::SessionRestoreErrorRafael Mendonça França2016-10-101-0/+9
|
* Deprecated ActionDispatch::ParamsParser::ParamsParserRafael Mendonça França2016-10-101-0/+5
| | | | | | ActionDispatch::ParamsParser class was removed in favor of ActionDispatch::Http::Parameters so it is better to move the error constant to the new class.
* Remove deprecated ActionDispatch::ParamsParserRafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated code in ActionDispatch::ParamsParser::ParseErrorRafael Mendonça França2016-10-101-0/+9
|
* Remove deprecated access to mime types through constantsRafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated support to non-keyword arguments #processRafael Mendonça França2016-10-101-0/+5
|
* Remove deprecated `xml_http_request` and `xhr` methodsRafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated methods in ActionController::ParametersRafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated comparing support with `ActionController::Parameters`Rafael Mendonça França2016-10-101-0/+5
|
* Remove deprecated support to :text in renderRafael Mendonça França2016-10-101-0/+4
|
* Remove deprecated support to :nothing in renderRafael Mendonça França2016-10-091-0/+4
|
* Remove deprecated support to `:back` in `redirect_to`Rafael Mendonça França2016-10-091-0/+4
|
* Remove deprecated support for status option in headRafael Mendonça França2016-10-091-0/+4
|
* Remove deprecation at ActionController::BadRequestRafael Mendonça França2016-10-091-0/+5
|
* Remove deprecated methods related to controller filtersRafael Mendonça França2016-10-091-0/+7
| | | | | | | | | | `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`.
* Show an "unmatched constraints" error for mismatching and present paramsChris Carter2016-10-031-0/+7
| | | | | | | | | | | | Currently a misleading "missing required keys" error is thrown when a param fails to match the constraints of a particular route. This commit ensures that these params are recognised as unmatching rather than missing. Note: this means that a different error message will be provided between optimized and non-optimized path helpers, due to the fact that the former does not check constraints when matching routes. Fixes #26470.
* Add #25546 and #25817 to changelog [ci skip]Philip Nguyen2016-09-231-0/+8
|
* make `fixture_file_upload` work in integration testsyuuji.yaginuma2016-09-041-0/+4
| | | | | | | | | Currently, `fixture_file_upload` does not work in integration test. Because, `TestProcess` module has been include in `Session` class, but `fixture_path` can not get from `Session` class. Modify to include `TestProcess` in `IntegrationTest` class in order to get correct value of `fixture_path`.
* Add changelog entry for #26328.Kasper Timm Hansen2016-08-311-0/+7
| | | | | I consider the missing deprecation warning a bug fix from the point of view of the 5.0.x series and forward.
* Fix nested multiple rootsRyo Hashimoto2016-08-291-1/+18
| | | | | | | | | | | | | | | 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.
* Include the content of the flash in the auto-generated etag (#26250)David Heinemeier Hansson2016-08-221-0/+12
| | | Include the content of the flash in the auto-generated etag
* Return 307 status instead of 301 when rerouting POST requests to SSLChirag Singhal2016-08-221-0/+20
| | | | | | | | | | | When `config.force_ssl` is set to `true`, any POST/PUT/DELETE requests coming in to non-secure url are being redirected with a 301 status. However, when that happens, the request is converted to a GET request and ends up hitting a different action on the controller. Since we can not do non-GET redirects, we can instead redirect with a 307 status code instead to indicate to the caller that a fresh request should be tried preserving the original request method. `rack-ssl` gem which was used to achieve this before we had this middleware directly baked into Rails also used to do the same, ref: https://github.com/josh/rack-ssl/blob/master/lib/rack/ssl.rb#L54 This would be specially important for any apps switching from older version of Rails or apps which expose an API through Rails.
* Copy edits in the documentation [ci skip]Rafael Mendonça França2016-08-191-3/+5
|
* Set the request type if as: is specifiedEverest Munro-Zeisberger2016-08-181-0/+5
| | | | Documentation & testing
* Pass over changelogs [ci skip]Vipul A M2016-08-101-5/+5
|
* Add changelog entry to Action Pack as well.Kasper Timm Hansen2016-08-071-0/+24
| | | | | The entry was a result of a combination of changes in Action View and Action Controller.
* Fix Accept header overridden when "xhr: true" in integration testDavid Chen2016-08-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | In integration test when specify the "Accept" header with "xhr: true" option, the Accept header is overridden with a default xhr Accept header. The issue only affects HTTP header "Accept" but not CGI variable "HTTP_ACCEPT". For example: get '/page', headers: { 'Accept' => 'application/json' }, xhr: true # This is WRONG! And the response.content_type is also affected. # It should be "application/json" assert_equal "text/javascript, text/html, ...", request.accept assert_equal 'text/html', response.content_type The issue is in `ActionDispatch::Integration::RequestHelpers`. When setting "xhr: true" the helper sets a default HTTP_ACCEPT if blank. But the code doesn't consider supporting both HTTP header style and CGI variable style. For detail see this GitHub issue: https://github.com/rails/rails/issues/25859
* Merge pull request #25913 from chrisarcand/fix-keyed-defaults-with-rootRafael Mendonça França2016-07-271-0/+7
|\ | | | | | | Fix keyed defaults with root
| * Update changelogChris Arcand2016-07-261-0/+7
|/
* CHANGELOG for https://github.com/rails/rails/pull/25257 [ci skip]Prathamesh Sonpatki2016-07-171-1/+1
| | | | - Also minor weekly CHANGELOG cleanup.
* Check `request.path_parameters` encoding at the point they're setGrey Baker2016-07-141-0/+10
| | | | | | | | 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.
* Don't raise ActionController::UnknownHttpMethod from ActionDispatch::StaticGrey Baker2016-07-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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.`
* Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`Grey Baker2016-07-121-0/+6
| | | | | | | | | | | | Rack [recently](https://github.com/rack/rack/commit/7e7a3890449b5cf5b86929c79373506e5f1909fb) moved the namespace of its `ParameterTypeError` and `InvalidParameterError` errors. Whilst an alias for the old name was added, the logic in `ActionDispatch::ExceptionWrapper` was still broken by this change, since it relies on the class name. This PR updates `ActionDispatch::ExceptionWrapper` to handle the Rack 2.0 namespaced errors correctly. We no longer need to worry about the old names, since Rails specifies Rack ~> 2.0.
* Start Rails 5.1 development :tada:Rafael Mendonça França2016-05-101-822/+1
|
* Preparing for 5.0.0.rc1 releaseRafael Mendonça França2016-05-061-0/+2
|
* Release notes: Add PR #24866 to release notesPrathamesh Sonpatki2016-05-051-1/+1
|
* Implement helpers proxy in controller instance levelRafael Mendonça França2016-05-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a common pattern in the Rails community that when people want to :xa use any kind of helper that is defined inside app/helpers they includes the helper module inside the controller like: module UserHelper def my_user_helper # ... end end class UsersController < ApplicationController include UserHelper def index render inline: my_user_helper end end This has problem because the helper can't access anything that is defined in the view level context class. Also all public methods of the helper become available in the controller what can lead to undesirable methods being routed and behaving as actions. Also if you helper depends on other helpers or even Action View helpers you need to include each one of these dependencies in your controller otherwise your helper is not going to work. We already have a helpers proxy at controller class level but that proxy doesn't have access to the instance variables defined in the controller. With this new instance level helper proxy users can reuse helpers in the controller without having to include the modules and with access to instance variables defined in the controller. class UsersController < ApplicationController def index render inline: helpers.my_user_helper end end
* Prep Rails 5 beta 4eileencodes2016-04-271-0/+2
|
* Merge pull request #23103 from rails/refactor-handling-of-action-defaultJeremy Daer2016-04-241-1/+6
|\ | | | | | | Refactor handling of :action default in routing
| * Refactor handling of :action default in routingAndrew White2016-02-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The longstanding convention in Rails is that if the :action parameter is missing or nil then it defaults to 'index'. Up until Rails 5.0.0.beta1 this was handled slightly differently than other routing defaults by deleting it from the route options and adding it to the recall parameters. With the recent focus of removing unnecessary duplications this has exposed a problem in this strategy - we are now mutating the request's path parameters and causing problems for later url generation. This will typically affect url_for rather a named url helper since the latter explicitly pass :controller, :action, etc. The fix is to add a default for :action in the route class if the path contains an :action segment and no default is passed. This change also revealed an issue with the parameterized part expiry in that it doesn't follow a right to left order - as soon as a dynamic segment is required then all other segments become required. Fixes #23019.