<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>has_many :thoughts: Tag actionpack</title>
    <link>http://blog.kineticweb.com/articles/tag/actionpack</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>request.xhr? is only for Prototype?</title>
      <description>&lt;p&gt;I just found this lovely tid-bit of information in the &lt;a href="http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html#M000407"&gt;ActionController::AbstractRequest&lt;/a&gt; class&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;# Returns true if the request's &amp;quot;X-Requested-With&amp;quot; header contains
# &amp;quot;XMLHttpRequest&amp;quot;. (The Prototype Javascript library sends this header with
# every Ajax request.)
def xml_http_request?
    !(@env['HTTP_X_REQUESTED_WITH'] !~ /XMLHttpRequest/i)
end
alias xhr? :xml_http_request?&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Mental note for later: Make sure to set this header when using jQuery in future projects&amp;#8230;. Not sure if jQuery does this already (probably not).&lt;/p&gt;</description>
      <pubDate>Wed, 26 Mar 2008 13:12:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:cf7dfbc4-7c45-41ed-b53d-24f0aa3e9021</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2008/03/26/request-xhr-is-only-for-prototype</link>
      <category>actionpack</category>
      <category>Javascript</category>
      <category>AJAX</category>
    </item>
  </channel>
</rss>
