<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for Paperfuse.com</title>
	<link>http://paperfuse.com</link>
	<description>Portfolio Site for Artist, Animator and Developer Jim Fisher</description>
	<pubDate>Wed, 10 Mar 2010 22:31:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>Comment on Distinct Values by Jim</title>
		<link>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-214</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Fri, 25 Sep 2009 18:11:57 +0000</pubDate>
		<guid>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-214</guid>
		<description>Without testing, I'm not entirely sure if it would work or not. However, I know it does work with self.distinct_values. I placed self. because this is a class method mixed into the ActiveRecord Class. All inheritied classes will now have this method. So this will allow Child &#60;(of) ActiveRecord::Base to call distinct values.</description>
		<content:encoded><![CDATA[<p>Without testing, I&#8217;m not entirely sure if it would work or not. However, I know it does work with self.distinct_values. I placed self. because this is a class method mixed into the ActiveRecord Class. All inheritied classes will now have this method. So this will allow Child &lt;(of) ActiveRecord::Base to call distinct values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Distinct Values by linhe</title>
		<link>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-213</link>
		<dc:creator>linhe</dc:creator>
		<pubDate>Fri, 25 Sep 2009 06:57:07 +0000</pubDate>
		<guid>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-213</guid>
		<description>sorry for post again, it seems I forgot to format the code plz clean it up for me.
&lt;pre&gt;
        (class &#60; "DISTINCT #{column}").map{&#124;x&#124; x.send(column)} if column_names.include?(column)
          end
        end
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>sorry for post again, it seems I forgot to format the code plz clean it up for me.</p>
<pre>
        (class &lt; "DISTINCT #{column}").map{|x| x.send(column)} if column_names.include?(column)
          end
        end
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Distinct Values by linhe</title>
		<link>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-212</link>
		<dc:creator>linhe</dc:creator>
		<pubDate>Fri, 25 Sep 2009 06:55:04 +0000</pubDate>
		<guid>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-212</guid>
		<description>Thanks for the post. Nice thoughts!

one question regarding this part of the code

(class &#60; "DISTINCT #{column}").map{&#124;x&#124; x.send(column)} if column_names.include?(column)
   end
end

should it be without 'self.' here?  def distinct_values(column) ... the eigen class of ActiveRecord would be Class#ActiveRecord.  maybe I'm missing something? :)</description>
		<content:encoded><![CDATA[<p>Thanks for the post. Nice thoughts!</p>
<p>one question regarding this part of the code</p>
<p>(class &lt; &#8220;DISTINCT #{column}&#8221;).map{|x| x.send(column)} if column_names.include?(column)<br />
   end<br />
end</p>
<p>should it be without &#8217;self.&#8217; here?  def distinct_values(column) &#8230; the eigen class of ActiveRecord would be Class#ActiveRecord.  maybe I&#8217;m missing something? <img src='http://paperfuse.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Distinct Values by Charles</title>
		<link>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-15</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Mon, 16 Mar 2009 23:32:18 +0000</pubDate>
		<guid>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-15</guid>
		<description>ok, cool i think that answers my very vague question.  By saying you "mix in" this method it means the base object has the method, so all other models can easily override or extend that method.</description>
		<content:encoded><![CDATA[<p>ok, cool i think that answers my very vague question.  By saying you &#8220;mix in&#8221; this method it means the base object has the method, so all other models can easily override or extend that method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Distinct Values by Jim</title>
		<link>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-14</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Sun, 15 Mar 2009 17:40:26 +0000</pubDate>
		<guid>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-14</guid>
		<description>in the case of ActiveRecord module (its already being included). When I extend my 'base' which is the where this module is included. I believe in ActiveRecord::Base. Then all inherited classes and there instances receive this method.</description>
		<content:encoded><![CDATA[<p>in the case of ActiveRecord module (its already being included). When I extend my &#8216;base&#8217; which is the where this module is included. I believe in ActiveRecord::Base. Then all inherited classes and there instances receive this method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Distinct Values by Charles</title>
		<link>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-13</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Sun, 15 Mar 2009 09:03:59 +0000</pubDate>
		<guid>http://paperfuse.com/2009/03/13/ruby/distinct-values/#comment-13</guid>
		<description>So by doing this:

    def self.included(base) # include this into the base of the class instance

The method is defined in the parent class for all extending classes.  And you can easily override / extend this method in all those extending classes?</description>
		<content:encoded><![CDATA[<p>So by doing this:</p>
<p>    def self.included(base) # include this into the base of the class instance</p>
<p>The method is defined in the parent class for all extending classes.  And you can easily override / extend this method in all those extending classes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Starting Back. by Charles</title>
		<link>http://paperfuse.com/2009/03/01/ruby/starting-back/#comment-10</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Thu, 12 Mar 2009 00:30:51 +0000</pubDate>
		<guid>http://paperfuse.com/2009/03/01/ruby/starting-back/#comment-10</guid>
		<description>I'm learning...something already</description>
		<content:encoded><![CDATA[<p>I&#8217;m learning&#8230;something already</p>
]]></content:encoded>
	</item>
</channel>
</rss>
