method
patch
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
v4.2.9 -
Show latest stable
-
1 note -
Class: ActionDispatch::Integration::RequestHelpers
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2 (0)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (0)
- 5.1.7 (4)
- 5.2.3 (38)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
patch(path, parameters = nil, headers_or_env = nil)
public
Performs a PATCH request with the given parameters. See #get for more details.
Register or
log in
to add new notes.
RossInBoulder -
January 3, 2016
![Default_avatar_30](https://www.gravatar.com/avatar/17a4f6b25d9231c884da0fc6a5cda209?default=http://apidock.com/images/default_avatar_30.png&size=30)
0 thanks
Setting HTTP_REFERER
If your integration test is checking for correct behavior of a redirect to the request referer, you can set the referring path in the headers hash with syntax like:
patch update_user_role_path, { user: {role: "vip"} }, { 'HTTP_REFERER' => user_url } assert_redirected_to user_url