<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Topper's Blog &#187; method override</title>
	<atom:link href="http://blog.toppingdesign.com/tag/method-override/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.toppingdesign.com</link>
	<description>Usability, Information Management, Rails, Javascript &#38; (oh no) Web 2.0</description>
	<lastBuildDate>Tue, 24 Jan 2012 19:52:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>_method in recent rails is brokenish</title>
		<link>http://blog.toppingdesign.com/2010/02/28/_method-in-recent-rails-is-brokenish/</link>
		<comments>http://blog.toppingdesign.com/2010/02/28/_method-in-recent-rails-is-brokenish/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 18:14:33 +0000</pubDate>
		<dc:creator>Topper</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[General Web work - technical]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[method override]]></category>
		<category><![CDATA[override]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[puth]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails235]]></category>
		<category><![CDATA[rubyonrails]]></category>
		<category><![CDATA[_method]]></category>

		<guid isPermaLink="false">http://blog.toppingdesign.com/2010/02/28/_method-in-recent-rails-is-brokenish/</guid>
		<description><![CDATA[I was trying to pass in _method: 'put' as part of a json body and for some reason rails kept not realizing that I wanted to put. Then I came across this article: http://stackoverflow.com/questions/1249282/set-method-to-put-in-rails-xml-requests So... if you're using prototype your "put" methods look something like this: PLAIN TEXT JavaScript: new Ajax.Request&#40;url, &#123; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to pass in _method: 'put' as part of a json body and for some reason rails kept not realizing that I wanted to put.</p>
<p>Then I came across this article: <a href="http://blog.toppingdesign.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0aW9ucy8xMjQ5MjgyL3NldC1tZXRob2QtdG8tcHV0LWluLXJhaWxzLXhtbC1yZXF1ZXN0cw==">http://stackoverflow.com/questions/1249282/set-method-to-put-in-rails-xml-requests</a></p>
<p>So... if you're using prototype your "put" methods look something like this:</p>
<div class="igBar"><span id="ljavascript-2"><a href="http://blog.toppingdesign.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=Iw==" onclick=\"javascript:showPlainTxt('javascript-2'); return false;\">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">new</span> Ajax.<span style="color: #006600;">Request</span><span style="color: #66cc66;">&#40;</span>url, <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onSuccess: callback,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requestHeaders: <span style="color: #66cc66;">&#123;</span><span style="color: #3366CC;">'X-Http-Method-Override'</span>: <span style="color: #3366CC;">'put'</span><span style="color: #66cc66;">&#125;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; postBody: Object.<span style="color: #006600;">toJSON</span><span style="color: #66cc66;">&#40;</span>params<span style="color: #66cc66;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; contentType: <span style="color: #3366CC;">"application/json"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
 <img src="http://blog.toppingdesign.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=182" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.toppingdesign.com/2010/02/28/_method-in-recent-rails-is-brokenish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

