aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* | [ci skip] Remove extra `so` from the Action Pack CHANGELOGPrathamesh Sonpatki2016-04-141-2/+2
| |
* | Merge pull request #24318 from bogdanvlviv/patch-1Rafael Mendonça França2016-04-121-0/+4
|\ \ | | | | | | | | | extension synonyms yml and yaml
| * | extension synonyms yml and yamlBogdan2016-03-271-0/+4
| | |
* | | it's => its typoRyan McCuaig2016-04-041-1/+1
| | |
* | | Fixes #24239Ryan T. Hosford2016-04-041-0/+9
| | | | | | | | | | | | | | | - skip calling helper_method if it's not there: if we don't have helpers, we needn't define one. - tests that an api controller can include and use ActionController::Cookies
* | | Strong ETag validatorsJeremy Daer2016-03-311-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce `Response#strong_etag=` and `#weak_etag=` and analogous options for `fresh_when` and `stale?`. `Response#etag=` sets a weak ETag. Strong ETags are desirable when you're serving byte-for-byte identical responses that support Range requests, like PDFs or videos (typically done by reproxying the response from a backend storage service). Also desirable when fronted by some CDNs that support strong ETags only, like Akamai. * No longer strips quotes (`"`) from ETag values before comparing them. Quotes are significant, part of the ETag. A quoted ETag and an unquoted one are not the same entity. * Support `If-None-Match: *`. Rarely useful for GET requests; meant to provide some optimistic concurrency control for PUT requests.
* | | Deprecate ActionDispatch::ParamsParser instance.Rafael Mendonça França2016-03-301-0/+5
|/ / | | | | | | | | | | Related with 38d2bf5fd1f3e014f2397898d371c339baa627b1. cc @tenderlove
* | Fix typo in Action Pack changelog [ci skip]Prathamesh Sonpatki2016-03-251-1/+1
| |
* | guides, sync railties and AP changelogs with 5.0 release notes.Yves Senn2016-03-221-12/+8
| | | | | | | | | | | | | | | | | | | | [ci skip] This updates the 5.0 release notes guide to reflect changes that happened after beta1 has been released. I'll sync the other changelogs later today but I'll push this batch to prevent against cumbersome merge conflicts.
* | Merge pull request #22854 from jcoyne/missing_templateSean Griffin2016-03-111-0/+7
|\ \ | | | | | | | | | Default rendering behavior if respond_to collector doesn't have a block.
| * | Render default template if block doesn't renderJustin Coyne2016-02-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | When a `respond_to` collector doesn't have a response, then a `:no_content` response should be rendered. This brings the default rendering behavior introduced by https://github.com/rails/rails/issues/19036 to controller methods employing `respond_to`
* | | Add `ActionController::Parameters#dig`Sean Griffin2016-03-091-0/+5
| | | | | | | | | | | | | | | | | | This method will only be added when used with Ruby 2.3.0 or greater. This method has the same behavior as `Hash#dig`, except it will convert hashes to `ActionController::Parameters`, similar to `#[]` and `#fetch`.
* | | Add changelog entry for #24115 [ci skip]Rafael Mendonça França2016-03-091-0/+5
| | |
* | | Merge pull request #24086 from yui-knk/do_not_ad_integration_test_classYves Senn2016-03-071-0/+5
|\ \ \ | | | | | | | | | | | | Prevent not-intended loading of `ActionDispatch::IntegrationTest`
| * | | Prevent not-intended loading of `ActionDispatch::IntegrationTest`yui-knk2016-03-071-0/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | After 9d378747326d26cf1afdac4433ead22967af0984 `ActionDispatch::IntegrationTest` class is loaded and defined in all Rails environments, not only test but also production. This is not-intended loading of a class which is only used in test environment. To prevent not-intended loading, add `ActiveSupport.run_load_hooks` to `ActionDispatch::IntegrationTest` with `action_dispatch_integration_test` name and use it in `ActionMailer`.
* / / Revert "Merge pull request #20851 from tomprats/indifferent-sessions"Matthew Draper2016-02-261-9/+0
|/ / | | | | | | | | | | | | This reverts commit 22db455dbe9c26fe6d723cac0758705d9943ea4b, reversing changes made to 40be61dfda1e04c3f306022a40370862e3a2ce39. This finishes off what I meant to do in 6216a092ccfe6422f113db906a52fe8ffdafdbe6.
* | Lock down new `ImplicitRender` behavior for 5.0 RCGodfrey Chan2016-02-251-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Conceptually revert #20276 The feature was implemented for the `responders` gem. In the end, they did not need that feature, and have found a better fix (see plataformatec/responders#131). `ImplicitRender` is the place where Rails specifies our default policies for the case where the user did not explicitly tell us what to render, essentially describing a set of heuristics. If the gem (or the user) knows exactly what they want, they could just perform the correct `render` to avoid falling through to here, as `responders` did (the user called `respond_with`). Reverting the patch allows us to avoid exploding the complexity and defining “the fallback for a fallback” policies. 2. `respond_to` and templates are considered exhaustive enumerations If the user specified a list of formats/variants in a `respond_to` block, anything that is not explicitly included should result in an `UnknownFormat` error (which is then caught upstream to mean “406 Not Acceptable” by default). This is already how it works before this commit. Same goes for templates – if the user defined a set of templates (usually in the file system), that set is now considered exhaustive, which means that “missing” templates are considered `UnknownFormat` errors (406). 3. To keep API endpoints simple, the implicit render behavior for actions with no templates defined at all (regardless of formats, locales, variants, etc) are defaulted to “204 No Content”. This is a strictly narrower version of the feature landed in #19036 and #19377. 4. To avoid confusion when interacting in the browser, these actions will raise an `UnknownFormat` error for “interactive” requests instead. (The precise definition of “interactive” requests might change – the spirit here is to give helpful messages and avoid confusions.) Closes #20666, #23062, #23077, #23564 [Godfrey Chan, Jon Moss, Kasper Timm Hansen, Mike Clark, Matthew Draper]
* | Preparing for 5.0.0.beta3 releaseeileencodes2016-02-241-0/+2
| | | | | | | | Adds changelog headers for beta3 release
* | No need CHANGELOG entry for #23849.Rafael Mendonça França2016-02-241-16/+0
| | | | | | | | | | | | | | It is not a released feature so we don't need to add changelogs to changes on it. [ci skip]
* | Show permitted flag in the output of AC::Parameters#inspectPrathamesh Sonpatki2016-02-241-4/+20
| | | | | | | | - Fixes #23822.
* | Merge pull request #20851 from tomprats/indifferent-sessionsRafael Mendonça França2016-02-241-0/+9
|\ \ | | | | | | | | | Give Sessions Indifferent Access
| * | Update session to have indifferent accessTom Prats2016-01-291-0/+9
| | |
* | | application/gzip added as default mime type into mime type listMehmet Emin İNAÇ2016-02-131-0/+4
| |/ |/|
* | Add fixes accidentally removed.Kasper Timm Hansen2016-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Yesterday, when improving how `parsed_body` extracted a parser I wrote 77bbf1e. Then I thought that was too many changes in one commit and broke it up locally... or so I thought. When pushed the extra commits removed the changes! Wups! In shame, lob those changes together here: * 3b94c38 which meant to fix the CHANGELOG syntax error. * 5007df5 which meant to mention `parsed_body` in the docs. * 036a7a0 which meant to memoize the `parsed_body`.
* | Flesh out request encoding + response parsing changelog entry.Kasper Timm Hansen2016-02-121-2/+11
| | | | | | | | | | | | | | Add more info about the APIs added and how they work. Use string keys when comparing the parsed response, like how JSON would be parsed.
* | use rails instead of rakeGaurav Sharma2016-02-121-2/+2
| | | | | | since starting with Rails 5.x(beta) we prefer to use rails as the replacement of rake commands, may be change log will be the same
* | - Fixed and removed long arguments to rake routesVipul A M2016-02-121-2/+1
| | | | | | | | | | | | - Fixed related documentation and usage all around Fixes #23561
* | Add request encoding and response parsing to changelog.Kasper Timm Hansen2016-02-101-0/+38
| | | | | | | | | | Forgot to add this in the original pull request. No biggie, just show some examples.
* | Add SVG as a default mime typeDavid Heinemeier Hansson2016-02-071-0/+4
| |
* | Update CHANGELOG.mdKang-Kyu Lee2016-02-011-2/+2
| | | | | | fix indentation to show it as code
* | Add some Action Cable CHANGELOG entriesRafael Mendonça França2016-02-011-3/+0
| | | | | | | | | | | | And improve changelongs. [ci skip]
* | Preparing for Rails 5.0.0.beta2Sean Griffin2016-02-011-1/+6
| |
* | Add options for rake routes taskVipul A M2016-02-021-0/+10
|/ | | | | | | | | | Add two options: `-c` and `-g`. `-g` option returns the urls name, verb and path fields that match the pattern. `-c` option returns the urls for specific controller. Fixes #18902, and Fixes #20420 [Anton Davydov & Vipul A M]
* rm changelog for unreleased changes fixesVipul A M2016-01-221-4/+0
| | | | | | Based on https://github.com/rails/rails/pull/23167/files#r50507317 [ci skip]