<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kevin,<br>
<br>
You can use #xhr instead of #get or #post, thus...<br>
<br>
xhr :post, :create, :id => etc...<br>
<br>
this will send something that the controller is able to recognise as an
AJAX request.<br>
<br>
#xhr is inherited from the original <a
href="http://api.rubyonrails.org/classes/ActionController/TestProcess.html#M000065">Rails
test framework</a>, but rather taken for granted in the Rspec docs
(I'll submit a request to improve them).<br>
<br>
Hope this helps,<br>
Jerry<br>
<br>
Kevin Williams wrote:
<blockquote
cite="mid683a886f0702072117i3aaa4fbcs52c9a2fe1fa2cf27@mail.gmail.com"
type="cite">
<pre wrap="">I have an Ajax responder method which uses respond_to to make sure it
only works with Ajax. I'm having trouble figuring out how to call this
action successfully. I'm using Rails 1.2.x. Any thoughts?
</pre>
</blockquote>
</body>
</html>