aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge pull request #22854 from jcoyne/missing_templateSean Griffin2016-03-111-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Default rendering behavior if respond_to collector doesn't have a block.
| * | | | | Render default template if block doesn't renderJustin Coyne2016-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`
* | | | | | [skip ci] Reorder paragraphsDamir2016-03-101-3/+3
| | | | | | | | | | | | | | | | | | The previous order made sense [when `match` was used twice to point to two different actions](https://github.com/rails/rails/commit/7305ef842b675bf965f063de681a96294577fb84). In this case the note was misleading as posting to `/posts/:id` would still route to `show` action.
* | | | | | add return values to example [ci skip]yuuji.yaginuma2016-03-101-1/+1
| | | | | |
* | | | | | Add `ActionController::Parameters#dig`Sean Griffin2016-03-091-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | | | | | Pass headers through to payload for logging.Gareth du Plooy2016-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make request headers available in the event payload so that it is available to attached ActionController::LogSubscribers.
* | | | | | extract ActionDispatch::IntegrationTest::BehaviorScott Bronson2016-03-071-22/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to 176fbfd6, this makes it possible for other test frameworks to hook into Rails integration test facilities.
* | | | | | Merge pull request #24086 from yui-knk/do_not_ad_integration_test_classYves Senn2016-03-071-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Prevent not-intended loading of `ActionDispatch::IntegrationTest`
| * | | | | | Prevent not-intended loading of `ActionDispatch::IntegrationTest`yui-knk2016-03-071-0/+2
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | | | | | Merge pull request #24091 from mcfiredrill/fix-helper-method-docsRafael França2016-03-071-1/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | clarify that helper_method makes both methods available in the view [ci skip]
| * | | | | clarify that helper_method makes both methods available in the viewTony Miller2016-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's probably obvious to most, but clarify that `:helper_method` will make both of these methods available to the view.
* | | | | | Remove http_cache_forever's version parameterJean Boussier2016-03-051-4/+2
| |_|/ / / |/| | | |
* | | | | [ci skip] Fix constrain_to documentation.Kasper Timm Hansen2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Forgot to update the documentation on the line just above the one I was changing in 4933132. Well done, Kasper :+1:
* | | | | Rename constrain_to to exclude.Kasper Timm Hansen2016-03-031-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActionDispatch::SSL` redirects all HTTP requests to HTTPS, not just some. The `constrain_to` option inverts this, so it sounds like the middleware only handles a few requests, rather than the majority with a few routes to opt out of the redirect. Renaming to `exclude` matches this intent more closely.
* | | | | Merge pull request #24027 from mechanicles/a-to-anXavier Noria2016-03-034-7/+7
|\ \ \ \ \ | |_|_|/ / |/| | | | Change 'a HTTP' to 'an HTTP' [ci skip]
| * | | | Change 'a HTTP' to 'an HTTP' [ci skip]Santosh Wadghule2016-03-034-7/+7
| | | | |
* | | | | Niceify the dynamic routes deprecation messagesJon Atack2016-03-031-2/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to #23980. - Fix grammar: "be remove" -> "be removed". - Wrap lines at 80 chars. Lurvely ;-)
* | | | Do not run app.executor callbacks in integration testsJorge Bejar and Santiago Pastorino2016-03-021-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts changes made to integration tests in PR #23807. The issue happens when using capybara with a driver that needs to start a server in a separate thread like (poltergeist, selenium, etc). Both threads the capybara server one and the test thread end running syncronize over the interlock.
* | | | Fix typo in implicit_renderMax Woolf2016-03-021-1/+1
| | | | | | | | | | | | When trying to make a request and the request doesn't have a suitable template, the new error messages are really helpful but there's a small (and I mean, VERY small) typo that has been bugging me for the last few days. This adds the space and restores order to the universe. :heart:
* | | | Merge pull request #23980 from rails/deprecate-controller-action-segmentsAndrew White2016-03-011-0/+9
|\ \ \ \ | | | | | | | | | | Deprecate :controller and :action path parameters
| * | | | Deprecate :controller and :action path parametersAndrew White2016-03-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allowing :controller and :action values to be specified via the path in config/routes.rb has been an underlying cause of a number of issues in Rails that have resulted in security releases. In light of this it's better that controllers and actions are explicitly whitelisted rather than trying to blacklist or sanitize 'bad' values.
* | | | | Don't reference Rails.application from inside a componentMatthew Draper2016-03-022-10/+8
| | | | |
* | | | | Publish AS::Executor and AS::Reloader APIsMatthew Draper2016-03-026-81/+59
|/ / / / | | | | | | | | | | | | | | | | | | | | These should allow external code to run blocks of user code to do "work", at a similar unit size to a web request, without needing to get intimate with ActionDipatch.
* | | | Merge pull request #23963 from gsamokovarov/exception-wrapper-no-ac-requireKasper Timm Hansen2016-02-291-1/+0
|\ \ \ \ | | | | | | | | | | Drop Action Controller require in ActionDispatch::ExceptionWrapper
| * | | | Drop Action Controller require in ActionDispatch::ExceptionWrapperGenadi Samokovarov2016-02-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only reference the Action Controller error classes by name in ActionDispatch::ExceptionWrapper, so there is no need to explicitly require them. It drops a tiny coupling between Action Dispatch and Action Controller, so it makes me feel warm inside. We still have a lot of others AC requires in the AD code base, but here, we can save it. [ci skip]
* | | | | Add documentation for #13897 [skip ci]Bart de Water2016-02-291-3/+9
|/ / / /
* | | | add `constraint_to` option to SSL middlewareGreg Molnar2016-02-281-2/+6
| | | |
* | | | :nail_care:Rafael Mendonça França2016-02-251-2/+2
| | | |
* | | | Merge pull request #23852 from prathamesh-sonpatki/hsts-subdomainsRafael França2016-02-251-1/+12
|\ \ \ \ | | | | | | | | | | Enable HSTS with IncludeSubdomains header by default for new apps
| * | | | Update documentation and deprecation messagePrathamesh Sonpatki2016-02-251-3/+3
| | | | |
| * | | | Added deprecation for older appsPrathamesh Sonpatki2016-02-251-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - For old apps which are not setting any value for hsts[:subdomains], a deprecation warning will be shown saying that hsts[:subdomains] will be turned on by default in Rails 5.1. Currently it will be set to false for backward compatibility. - Adjusted tests to reflect this change.
| * | | | HSTS without IncludeSubdomains is often uselessEgor Homakov2016-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Because if you forget to add Secure; to the session cookie, it will leak to http:// subdomain in some cases 2) Because http:// subdomain can Cookie Bomb/cookie force main domain or be used for phishing. That's why *by default* it must include subdomains as it's much more common scenario. Very few websites *intend* to leave their blog.app.com working over http:// while having everything else encrypted. Yes, many developers forget to add subdomains=true by default, believe me :)
* | | | | Revert "Merge pull request #20851 from tomprats/indifferent-sessions"Matthew Draper2016-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 22db455dbe9c26fe6d723cac0758705d9943ea4b, reversing changes made to 40be61dfda1e04c3f306022a40370862e3a2ce39. This finishes off what I meant to do in 6216a092ccfe6422f113db906a52fe8ffdafdbe6.
* | | | | Revert "Update Session to utilize indiffernt access"Matthew Draper2016-02-262-9/+15
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 45a75a3fcc96b22954caf69be2df4e302b134d7a. HWIAs are better than silently deeply-stringified hashes... but that's a reaction to a shortcoming of one particular session store: we should not break the basic behaviour of other, more featureful, session stores in the process. Fixes #23884
* | | | Additional review of 6b31761.Kasper Timm Hansen2016-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | * Fixes typos in error message and release notes. * Removes unused template test file.
* | | | Lock down new `ImplicitRender` behavior for 5.0 RCGodfrey Chan2016-02-252-18/+75
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* | | [ci skip] Replace usage of rake routes with rails routesAbhishek Jain2016-02-252-2/+2
| | |
* | | Prep release for Rails 5 beta3eileencodes2016-02-241-1/+1
| | |
* | | Show permitted flag in the output of AC::Parameters#inspectPrathamesh Sonpatki2016-02-241-1/+1
| | | | | | | | | | | | - Fixes #23822.
* | | Merge pull request #20851 from tomprats/indifferent-sessionsRafael Mendonça França2016-02-242-17/+11
|\ \ \ | | | | | | | | | | | | Give Sessions Indifferent Access
| * | | Update Session to utilize indiffernt accessTom Prats2016-01-302-15/+9
| | | |
| * | | Update session to have indifferent accessTom Prats2016-01-291-2/+2
| | | |
* | | | Merge branch 'actionmailer-cache'Rafael Mendonça França2016-02-245-69/+87
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | This is a rebased version of #22825. Closes #22825.
| * | | | Move private methods to the private visibilityRafael Mendonça França2016-02-241-10/+12
| | | | |
| * | | | Move Caching module to Abstract ControllerRafael Mendonça França2016-02-235-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abstract Controller is the common component between Action Mailer and Action Controller so if we need to share the caching component it need to be there.
| * | | | Remove unnecessarily included modules in ActionController::CachingStan Lo2016-02-231-1/+0
| | | | |
| * | | | Move ActionMailer::Caching's content into ActionMailer::Base instead of ↵Stan Lo2016-02-231-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | including it Remove useless helper in ActionDispatch::Caching and fix indentation
| * | | | Make caching configuration more flexibleStan Lo2016-02-232-7/+14
| | | | |
| * | | | Move most caching methods to ActionDispatch::Caching, and let ActionMailer ↵Stan Lo2016-02-232-54/+64
| | | | | | | | | | | | | | | | | | | | and ActionController to include it
| * | | | Move caching/fragments in ActionMailer and ActionController to ↵Stan Lo2016-02-232-6/+3
| | | | | | | | | | | | | | | | | | | | action_dispatch/caching/fragments