<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: So, cattr_accessor doesn&#8217;t work like it should?</title>
	<atom:link href="http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Wed, 17 Mar 2010 04:35:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andy Goundry</title>
		<link>http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/comment-page-1/#comment-37944</link>
		<dc:creator>Andy Goundry</dc:creator>
		<pubDate>Tue, 17 Jul 2007 09:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/#comment-37944</guid>
		<description>Wonderful post! Is the exact solution to my needs. I was (and still am) baffled that this stuff isn&#039;t available in Ruby.

Thanks!</description>
		<content:encoded><![CDATA[<p>Wonderful post! Is the exact solution to my needs. I was (and still am) baffled that this stuff isn&#8217;t available in Ruby.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 开发者 &#187; Blog Archive &#187; Rails源码研究之ActionController:一，基本架构、render、redirect</title>
		<link>http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/comment-page-1/#comment-33971</link>
		<dc:creator>开发者 &#187; Blog Archive &#187; Rails源码研究之ActionController:一，基本架构、render、redirect</dc:creator>
		<pubDate>Sun, 24 Jun 2007 00:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/#comment-33971</guid>
		<description>[...] 节选了部分代码，调用流程为process -&gt; perform_action =&gt; action &#124;&#124; method_missing &#124;&#124; template &#124;&#124; raise UnknownAction 其中需要注意的几点: 1，@@default_charset = &#8220;utf-8&#8243; 2，attr_internal的属性有request、params、response、session、headers 3，cattr_accessor的属性有default_charset、logger、consider_all_requests_local等 catter_accessor标识的是Class Attributes，见这篇BlogSo, cattr_accessor doesn’t work like it should? catter_accessor方法的定义在active_supportcore_extclassattribute_accessors.rb: 代码  class Class def cattr_reader(*syms) syms.flatten.each do &#124;sym&#124; next if sym.is_a?(Hash) class_eval(&lt;&lt; render_file 2):text -&gt; render_text 3):file -&gt; render_file 4):template -&gt; render_file 5):inline -&gt; render_template 6):action -&gt; render_action 7):xml -&gt; render_xml 8):json -&gt; render_json 9):partial -&gt; render_partial &#124;&#124; render_partial_collection 10):update -&gt; render_javascript 11):noting -&gt; render_text 5，redirect_to方法的参数有: 1)Hash -&gt; redirect_to(url_for(options)) [code] redirect_to :action =&gt; &#8220;show&#8221;, :id =&gt; 5 [...]</description>
		<content:encoded><![CDATA[<p>[...] 节选了部分代码，调用流程为process -&gt; perform_action =&gt; action || method_missing || template || raise UnknownAction 其中需要注意的几点: 1，@@default_charset = &#8220;utf-8&#8243; 2，attr_internal的属性有request、params、response、session、headers 3，cattr_accessor的属性有default_charset、logger、consider_all_requests_local等 catter_accessor标识的是Class Attributes，见这篇BlogSo, cattr_accessor doesn’t work like it should? catter_accessor方法的定义在active_supportcore_extclassattribute_accessors.rb: 代码  class Class def cattr_reader(*syms) syms.flatten.each do |sym| next if sym.is_a?(Hash) class_eval(&lt;&lt; render_file 2):text -&gt; render_text 3):file -&gt; render_file 4):template -&gt; render_file 5):inline -&gt; render_template 6):action -&gt; render_action 7):xml -&gt; render_xml 8):json -&gt; render_json 9):partial -&gt; render_partial || render_partial_collection 10):update -&gt; render_javascript 11):noting -&gt; render_text 5，redirect_to方法的参数有: 1)Hash -&gt; redirect_to(url_for(options)) [code] redirect_to :action =&gt; &#8220;show&#8221;, :id =&gt; 5 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramble On - Don&#8217;t Do That</title>
		<link>http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/comment-page-1/#comment-15355</link>
		<dc:creator>Ramble On - Don&#8217;t Do That</dc:creator>
		<pubDate>Thu, 05 Apr 2007 19:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/#comment-15355</guid>
		<description>[...] There&#8217;s a bit of discussion this on a separate, but related problem at Evan Weaver&#8217;s blog (pay special attention to that threading issue for those playing along with the home game). And of course, your friendly neighborhood reminder of what happens with class variables at Nic Williams&#8217; blog (I recommend reading that twice and breaking out the home game version of irb) [...]</description>
		<content:encoded><![CDATA[<p>[...] There&#8217;s a bit of discussion this on a separate, but related problem at Evan Weaver&#8217;s blog (pay special attention to that threading issue for those playing along with the home game). And of course, your friendly neighborhood reminder of what happens with class variables at Nic Williams&#8217; blog (I recommend reading that twice and breaking out the home game version of irb) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/comment-page-1/#comment-215</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 27 Aug 2006 20:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/#comment-215</guid>
		<description>Nice find!</description>
		<content:encoded><![CDATA[<p>Nice find!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/comment-page-1/#comment-213</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Sun, 27 Aug 2006 17:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/#comment-213</guid>
		<description>Yeah, sorry. cattr* and mattr* are added by rails.</description>
		<content:encoded><![CDATA[<p>Yeah, sorry. cattr* and mattr* are added by rails.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: choonkeat</title>
		<link>http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/comment-page-1/#comment-212</link>
		<dc:creator>choonkeat</dc:creator>
		<pubDate>Sun, 27 Aug 2006 17:20:39 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/08/27/so-cattr_accessor-doesnt-work-like-it-should/#comment-212</guid>
		<description>hmm, correction. attr_accessor comes from ruby, not from active_support.</description>
		<content:encoded><![CDATA[<p>hmm, correction. attr_accessor comes from ruby, not from active_support.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
