| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
detect the type of controller we're testing and return the right type of
response based on that controller. This allows us to stop doing the
weird sleep thing.
|
| |
| |
| |
| | |
callback and an error happens
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 4f2cd3e9 introduced a bug by reordering the call to
`@controller.recycle!` above the call to `build_request_uri`. The
impact of this was that the `@_url_options` cache ends up not being
reset between building a request URI (occurring within the test
controller) and the firing of the actual request.
We encountered this bug because we had the following setup:
class MinimumReproducibleController < ActionController::Base
before_filter { @param = 'param' }
def index
render text: url_for(params)
end
def default_url_options
{ custom_opt: @param }
end
end
def test_index
get :index # builds url, then fires actual request
end
The first step in `get :index` in the test suite would populate the
@_url_options cache. The subsequent call to `url_for` inside of the
controller action would then utilize the uncleared cache, thus never
calling the now-updated default_url_options.
This commit fixes this bug calling recycle! twice, and removes a call
to set response_body, which should no longer be needed since we're
recycling the request object explicitly.
|
| |
| |
| |
| | |
Remove 4-1 related entries from master [ci skip]
|
| |
| |
| |
| | |
See 449039a86d802871b707dfb51ac1ed96d53526f9 for the original commit.
|
| |
| |
| |
| | |
when only 1 parameter is unpermitted.
|
| | |
|
|/
|
|
| |
closes #14125
|
|
|
|
| |
ref #14062
|
|\
| |
| |
| |
| |
| | |
Conflicts:
actionview/CHANGELOG.md
activerecord/CHANGELOG.md
|
| | |
|
| |
| |
| |
| |
| | |
Setting this attribute to `true` will remove the content type header
from the request. This is use in `render :body` feature.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an option for to HTML content with a content type of
`text/html`. This rendering option calls `ERB::Util.html_escape`
internally to escape unsafe HTML string, so you will have to mark your
string as html safe if you have any HTML tag in it.
Please see #12374 for more detail.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is as an option to render content with a content type of
`text/plain`. This is the preferred option if you are planning to render
a plain text content.
Please see #12374 for more detail.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an option for sending a raw content back to browser. Note that
this rendering option will unset the default content type and does not
include "Content-Type" header back in the response.
You should only use this option if you are expecting the "Content-Type"
header to not be set. More information on "Content-Type" header can be
found on RFC 2616, section 7.2.1.
Please see #12374 for more detail.
|
| |
| |
| |
| |
| | |
Was custom_proxies in inline docs, but should be and defined in
constructor as custom_proxies
|
| |
| |
| |
| |
| |
| | |
if the controller action has not yet streamed any data, actions should
process as normal, and errors should trigger the appropriate behavior
(500, or in the case of ActionController::BadRequest, a 400 Bad Request)
|
| |
| |
| |
| | |
defined (just like any other variant)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow setting `request.variant` as an array - an order in which they will be
rendered.
For example:
request.variant = [:tablet, :phone]
respond_to do |format|
format.html.none
format.html.phone # this gets rendered
end
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also added a `cookies_serializer.rb` initializer to the app template.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Stringify the incoming as well to handle incoming symbol keys from
marshalled sessions
|
| | |
|
| |
| |
| |
| | |
(currently failing)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This was a reaction to: https://github.com/rails/rails/pull/9700#issuecomment-34550210
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we set :shallow_path when shallow is called it can result in incorrect
paths if the resource is inside a namespace because namespace itself sets
the :shallow_path option to the namespace path.
We fix this by removing the :shallow_path option from shallow as that should
only be turning shallow routes on and not otherwise affecting the scope.
To do this we need to treat the :shallow option to resources differently to
other scope options and move it to before the nested block is called.
This change also has the positive side effect of making the behavior of the
:shallow option consistent with the shallow method.
Fixes #12498.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
guides/source/active_record_validations.md
guides/source/api_documentation_guidelines.md
guides/source/configuring.md
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix response flatten infinite recursion
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Returning `self` from within the array returned by `to_ary`
caused this. Instead, we can just substitute another object.
It provides the `each` behavior required by the rack spec.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
FilterParameters is referenced at the class level from the Request
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
Since it's already required in the file, we don't need to use autoload
too. This commit is symmetrical change to 0b10180 for Response.
|
|\ \ \ \
| | | | |
| | | | | |
Remove outdated TODO from url_for test, this test was fixed in 900a2d30
|
| |/ / / |
|