 
<?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: !nil != not nil</title>
	<atom:link href="http://blog.adsdevshop.com/2008/01/25/nil-not-nil/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adsdevshop.com/2008/01/25/nil-not-nil/</link>
	<description>Helping companies increase predicability and business agility.</description>
	<lastBuildDate>Fri, 19 Mar 2010 19:56:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Josh</title>
		<link>http://blog.adsdevshop.com/2008/01/25/nil-not-nil/comment-page-1/#comment-5938</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Sun, 27 Jan 2008 06:34:08 +0000</pubDate>
		<guid isPermaLink="false">http://rorblog.techcfl.com/2008/01/25/nil-not-nil/#comment-5938</guid>
		<description>I&#039;m trying to do the same thing, select all where description is not null. I Brians&#039;S his code but I get an error. I ended up adding a boolean to the table that indicates whether its entered, but I would like to find a solution to select entries where properties are anything but nil!</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to do the same thing, select all where description is not null. I Brians&#8217;S his code but I get an error. I ended up adding a boolean to the table that indicates whether its entered, but I would like to find a solution to select entries where properties are anything but nil!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Terlson</title>
		<link>http://blog.adsdevshop.com/2008/01/25/nil-not-nil/comment-page-1/#comment-5929</link>
		<dc:creator>Brian Terlson</dc:creator>
		<pubDate>Fri, 25 Jan 2008 20:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://rorblog.techcfl.com/2008/01/25/nil-not-nil/#comment-5929</guid>
		<description>As other&#039;s have mentioned, Rails can&#039;t really be smart enough to notice the difference between true and !nil, since ruby considers them equal.  The alternative is to not use the dynamic finders... find(:all, :conditions =&gt; [&#039;category_id=42 and description IS NOT NULL&#039;]) for example.</description>
		<content:encoded><![CDATA[<p>As other&#8217;s have mentioned, Rails can&#8217;t really be smart enough to notice the difference between true and !nil, since ruby considers them equal.  The alternative is to not use the dynamic finders&#8230; find(:all, :conditions =&gt; ['category_id=42 and description IS NOT NULL']) for example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shadowfiend</title>
		<link>http://blog.adsdevshop.com/2008/01/25/nil-not-nil/comment-page-1/#comment-5928</link>
		<dc:creator>Shadowfiend</dc:creator>
		<pubDate>Fri, 25 Jan 2008 17:49:09 +0000</pubDate>
		<guid isPermaLink="false">http://rorblog.techcfl.com/2008/01/25/nil-not-nil/#comment-5928</guid>
		<description>The problem is that this would require handling boolean fields appropriately (as for them true should be handled as true) and possibly dealing with situations where the field is not nullable, as the programmer may be anticipating an = 1 there, as well. It&#039;s realizing that this is the same as typing find_all_by_category...(42, true) that complicates the issue. Perhaps if there was a constant NOT_NULL or something of the sort that was a particular type of object that could be recognized, that would make more sense.</description>
		<content:encoded><![CDATA[<p>The problem is that this would require handling boolean fields appropriately (as for them true should be handled as true) and possibly dealing with situations where the field is not nullable, as the programmer may be anticipating an = 1 there, as well. It&#8217;s realizing that this is the same as typing find_all_by_category&#8230;(42, true) that complicates the issue. Perhaps if there was a constant NOT_NULL or something of the sort that was a particular type of object that could be recognized, that would make more sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Cooper</title>
		<link>http://blog.adsdevshop.com/2008/01/25/nil-not-nil/comment-page-1/#comment-5927</link>
		<dc:creator>Peter Cooper</dc:creator>
		<pubDate>Fri, 25 Jan 2008 17:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://rorblog.techcfl.com/2008/01/25/nil-not-nil/#comment-5927</guid>
		<description>I agree. !nil becomes &#039;true&#039;. Perhaps you should write a patch so that true becomes IS NOT NULL. I think it would get popular support, although this is not a common usage.</description>
		<content:encoded><![CDATA[<p>I agree. !nil becomes &#8216;true&#8217;. Perhaps you should write a patch so that true becomes IS NOT NULL. I think it would get popular support, although this is not a common usage.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
