<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Rails + JQGrid + OpenID problem: solved!</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/rails-jqgrid-openid-problem-solved</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/rails-jqgrid-openid-problem-solved/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>rickwayne on Rails + JQGrid + OpenID problem: solved!</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/rails-jqgrid-openid-problem-solved#p26704</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/rails-jqgrid-openid-problem-solved#p26704</guid>
        	        	<description><![CDATA[<p>I would just reply to my own post, but it has not yet been moderated, so I&#39;ll put this in to save any would-be helpers some time.</p>
<p>Our story so far: My Rails application&#39;s JQGrid&#39;s POST requests were running afoul of the OpenID mechanism, as if the browser session didn&#39;t belong to this user, or they hadn&#39;t authenticated with their OpenID Identity Provider. (You&#39;ll know if you&#39;re having the same problem if the last thing the browser sees is a 401 error.)</p>
<p>Basically, Sante at the OpenID Code list pointed me to the forgery-protection mechanism in Rails as the culprit. Sure enough, when I turned that off it worked. Of course you can&#39;t just leave it off, but I found a very nice fix at <a href="http://henrik.nyh.se/2008/05/rails-authenticity-token-with-jquery&#160;which" rel="nofollow" target="_blank"><a href="http://henrik.nyh.se/2008/05/r" rel="nofollow">http://henrik.nyh.se/2008/05/r</a>.....nbsp;which</a> adds a handler for the ajaxSend event, ensuring that the Rails authenticity token is included with each and every Ajax request. One line in one file, seven in another, problem solved. Oh happy day! Thanks Sante and Henrik!</p>
]]></description>
        	        	<pubDate>Thu, 31 May 2012 01:34:37 +0300</pubDate>
        </item>
</channel>
</rss>