aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-05 18:27:47 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-05 18:27:47 -0200
commit35e2255b7afd31f78d7d1978f3dff91f3dfed719 (patch)
tree98987ca57c4309e4c859147fc62085b4cfef204e /guides
parent9cb461ba033c66a3bc91960e9274b804a7a42459 (diff)
parentb19999f3a7c39fc1a959cc3c39575014d0fd2835 (diff)
downloadrails-35e2255b7afd31f78d7d1978f3dff91f3dfed719.tar.gz
rails-35e2255b7afd31f78d7d1978f3dff91f3dfed719.tar.bz2
rails-35e2255b7afd31f78d7d1978f3dff91f3dfed719.zip
Merge pull request #18771 from kirs/deprecate-xhr
Migrating xhr methods to keyword arguments syntax
Diffstat (limited to 'guides')
-rw-r--r--guides/source/testing.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index a083b3f981..7345c7f522 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -537,11 +537,11 @@ NOTE: Functional tests do not verify whether the specified request type is accep
### Testing XHR (AJAX) requests
-`xhr` accepts method (listed in the section above), action name and parameters:
+Enable set `xhr: true` option as an argument to `get/post/patch/put/delete` method:
```ruby
test "ajax request responds with no layout" do
- xhr :get, :show, params: { id: articles(:first).id }
+ get :show, params: { id: articles(:first).id }, xhr: true
assert_template :index
assert_template layout: nil