aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* 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]
* Fix `ActionController::Parameters#==` bugJon Moss2016-01-211-0/+4
| | | | See bug #21032.
* Response etags to always be weak: Prefixed W/ to value returned by ↵abhishek2016-01-201-0/+8
| | | | ActionDispatch::Http::Cache::Response#etag= such that etags set in fresh_when and stale? are weak. For #17556.
* Pass through AP CHANGELOG [ci skip]Vipul A M2016-01-181-2/+2
|
* docs, formatting pass over changelogs. [ci skip]Yves Senn2016-01-131-4/+4
|
* Add both HTTP Response Code and Type to assertion messagesSean Collins2016-01-121-0/+4
| | | | | Also, refactor logic to convert between symbol and response code, via the AssertionResponse class
* Fix typo in ActionPack CHANGELOG [ci skip]Prathamesh Sonpatki2016-01-081-1/+1
|
* add gregBen Toews2016-01-071-1/+1
|
* Better error message when running `rake routes` with CONTROLLER arg:Edouard CHIN2016-01-071-0/+8
| | | | | | | - `CONTROLLER` argument can now be supplied in different ways (Rails::WelcomeController, Rails::Welcome, rails/welcome) - If `CONTROLLER` argument was supplied but it does not exist, will warn the user that this controller does not exist - If `CONTROLLER` argument was supplied and no routes could be found matching this filter, will warn the user that no routes were found matching the supplied filter - If no routes were defined in the config/routes.rb file, will warn the user with the original message
* Allow AC::Parameters as an argument to url_helpersPrathamesh Sonpatki2016-01-071-0/+8
| | | | | | | | - Earlier only Hash was allowed as params argument to url_helpers. - Now ActionController::Parameters instances will also be allowed. - If the params are not secured then it will raise an ArgumentError to indicate that constructing URLs with non-secure params is not recommended. - Fixes #22832.