aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
Commit message (Collapse)AuthorAgeFilesLines
* HSTS subdomains is now true, so let's fix documentation [ci skip] (#26870)प्रथमेश Sonpatki2016-10-231-1/+1
| | | - Followup of fda5afeb
* Revert "Undefine assings in IntegrationTest"Rafael Mendonça França2016-10-211-2/+0
| | | | | | This reverts commit 5dde413e1d14c42eb87071db20d075a7b962cb01. Reason: The gem defines it so we don't need to remove
* /s/integrations/integration [ci skip] (#26801)प्रथमेश Sonpatki2016-10-161-1/+1
|
* Merge pull request #26786 from codeodor/patch-1Eileen M. Uchitelle2016-10-151-1/+3
|\ | | | | Allow any key in Renderer environment hash
| * Allow any key in Renderer environment hashSammy Larbi2016-10-151-1/+3
| | | | | | | | | | | | 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.
* | Copy-edit the documentationRafael Mendonça França2016-10-151-4/+4
| | | | | | | | [ci skip]
* | Make `process` a non-private method and update documentation.Zach Aysan2016-10-151-98/+100
|/
* ActionController::Parameters#deep_dup (#26567)Pavel Evstigneev2016-10-111-0/+7
| | | | | | | | | | | * ActionController::Parameters#deep_dup * Tests for ActionController::Parameters#deep_dup * Fix test for ActionController::Parameters#deep_dup * More tests for ActionController::Parameters#deep_dup [Rafael Mendonça França + Pavel Evstigneev]
* Add missing @, fix indents. [ci skip]bogdanvlviv2016-10-101-6/+6
|
* Remove deprecated support to non-keyword arguments in ↵Rafael Mendonça França2016-10-101-42/+11
| | | | | | `ActionDispatch::IntegrationTest`, `#process`, `#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head`.
* Remove deprecated `ActionDispatch::IntegrationTest#*_via_redirect`.Rafael Mendonça França2016-10-101-53/+0
|
* Remove deprecated `ActionDispatch::IntegrationTest#xml_http_request`Rafael Mendonça França2016-10-101-32/+0
|
* Remove deprecated support for passing `:path` and route path as stings in ↵Rafael Mendonça França2016-10-101-12/+1
| | | | `ActionDispatch::Routing::Mapper#match`
* Remove deprecated support passing path as `nil` in ↵Rafael Mendonça França2016-10-101-5/+1
| | | | `ActionDispatch::Routing::Mapper#match`
* Remove deprecated `cache_control` argument from ↵Rafael Mendonça França2016-10-101-8/+1
| | | | `ActionDispatch::Static#initialize`
* Remove deprecated support to passing strings to the middleware stackRafael Mendonça França2016-10-102-21/+2
|
* Remove deprecated code in ssl middlewareRafael Mendonça França2016-10-101-21/+3
|
* Remove deprecated code in ActionDispatch::Session::SessionRestoreErrorRafael Mendonça França2016-10-101-11/+1
|
* Deprecated ActionDispatch::ParamsParser::ParamsParserRafael Mendonça França2016-10-105-34/+27
| | | | | | 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-12/+1
|
* Remove deprecated code in ActionDispatch::ParamsParser::ParseErrorRafael Mendonça França2016-10-101-17/+1
|
* Remove deprecated access to mime types through constantsRafael Mendonça França2016-10-101-26/+0
|
* Remove deprecated support to non-keyword arguments #processRafael Mendonça França2016-10-101-70/+16
|
* Remove deprecated `xml_http_request` and `xhr` methodsRafael Mendonça França2016-10-101-15/+0
|
* Remove deprecated methods in ActionController::ParametersRafael Mendonça França2016-10-101-20/+0
|
* Remove deprecated comparing support with `ActionController::Parameters`Rafael Mendonça França2016-10-101-9/+0
|
* Remove deprecated support to :text in renderRafael Mendonça França2016-10-101-12/+1
|
* Remove deprecated support to :nothing in renderRafael Mendonça França2016-10-091-5/+0
|
* Remove deprecated support to `:back` in `redirect_to`Rafael Mendonça França2016-10-091-8/+0
|
* Remove deprecated support for status option in headRafael Mendonça França2016-10-091-7/+1
|
* Remove deprecation at ActionController::BadRequestRafael Mendonça França2016-10-091-11/+1
|
* Remove deprecated methods related to controller filtersRafael Mendonça França2016-10-091-39/+0
| | | | | | | | | | `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`.
* Undefine assings in IntegrationTestRafael Mendonça França2016-10-071-0/+2
| | | | | assigns assert the state of a controller instance what should not be done in an integration test.
* [ci-skip] Swap method and its alias, format docAndrey Molchanov2016-10-041-3/+4
|
* Show an "unmatched constraints" error for mismatching and present paramsChris Carter2016-10-032-2/+6
| | | | | | | | | | | | 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.
* Remove obsolete comment about class-level respond_toAndrew White2016-10-011-2/+0
| | | | | | The class-level respond_to was extracted in ee77770 to responders gem [ci skip]
* Merge pull request #26573 from kirs/action-controller-as-formatRafael França2016-09-271-4/+4
|\ | | | | Make :as option also set request format (AC::TestCase)
| * Make :as option also set request format (AC::TestCase)Kir Shatrov2016-09-211-4/+4
| | | | | | | | | | | | | | | | right now you'd have to specify both :as and :format: ``` post :create, params: { foo: "bar" } as: :json, format: :json ```
* | Only search fixture_path for files that can't be found directlyMatthew Draper2016-09-241-1/+2
| | | | | | | | | | | | | | | | | | | | When passed an already-valid file name, prepending the path is likely to create problems. This is particularly relevant for #26384, which adds fixture_path handling to test classes that previously didn't have it: any existing caller must have been manually locating the file, and we don't want to break them.
* | Merge pull request #26589 from kirs/ad-test-request-methodArthur Nogueira Neves2016-09-221-1/+1
|\ \ | | | | | | Fix memoization bug on ActionDispatch::TestRequest#request_method=
| * | Fix memoization bug on ActionDispatch::TestRequest#request_method=Kir Shatrov2016-09-221-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TestRequest have been overrriding request_method setter since 2009, but the actual implementation in Request (not TestRequest) has been changed since that. Now it's also using @request_method instance variable to keep the state. The override in TestRequest have not been calling `super`, which caused a bug that after accessing #requst_method the value was memoized and then we've never been able to change it anymore: ``` req = ActionDispatch::TestRequest.create puts "was: #{req.request_method}" # memoized here req.request_method = "POST" puts "became: #{req.request_method}" ``` output: ``` was: GET became: GET ``` Since the whole purpose of overriding the setter in TestRequest is to upcase it, I'm changing it to `super(method.to_s.upcase)`
* | Merge pull request #26498 from FriedSock/correct-render-text-deprecation-messageRafael França2016-09-141-1/+1
|\ \ | | | | | | Correct `render text:` deprecation message
| * | Correct `render text:` deprecation messageJack Bracewell2016-09-141-1/+1
| | | | | | | | | The default Content-Type is `text/html`, not `text/plain`.
* | | Merge pull request #26477 from kirs/action_dispatch-assert_responseRafael França2016-09-141-1/+6
|\ \ \ | |/ / |/| | Improve assert_response helper
| * | Improve assert_response helperKir Shatrov2016-09-141-1/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the check is failed, print the actual response body if it's not too large. This could improve productivity when writing new tests. Before: ``` ThemeEditorIntegrationTest#test_whatever Expected response to be a <200: ok>, but was a <422: Unprocessable Entity>. Expected: 200 Actual: 422 ``` After: ``` ThemeEditorIntegrationTest#test_whatever Expected response to be a <200: ok>, but was a <422: Unprocessable Entity>. Expected: 200 Actual: 422 Response body: {"errors":["Invalid settings object for section '1'"]} ```
* | Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-148-47/+47
| | | | | | | | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
* | Do not mutate AC::TestRequest::DEFAULT_OPTIONSKir Shatrov2016-09-101-1/+1
|/
* Merge pull request #26418 from y-yagi/fixes_26415Richard Schneeman2016-09-071-1/+1
|\ | | | | call `.to_h` to avoid using deprecated method
| * call `.to_h` to avoid using deprecated methodyuuji.yaginuma2016-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | `ActionController::Parameters#merge` call `HashWithIndifferentAccess#merge`. In addition, it calls `HashWithIndifferentAccess#update` from `HashWithIndifferentAccess#merge`, where it is called the `#to_hash` of argument. But `ActionController::Parameters#to_hash` is deprecated, warning message is displayed. To avoid this, modify to convert object to `Hash`. Fixes #26415
* | Merge pull request #26016 from nateberkopec/patch-1Vipul A M2016-09-071-2/+3
|\ \ | |/ |/| Clarify expires_now documentation