<?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"
	>
<channel>
	<title>Comments on: Override default find conditions for model</title>
	<atom:link href="http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/</link>
	<description>A blog about web development, especially ruby on rails.</description>
	<pubDate>Tue, 06 Jan 2009 13:48:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: PhilT</title>
		<link>http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/#comment-650</link>
		<dc:creator>PhilT</dc:creator>
		<pubDate>Fri, 19 Dec 2008 09:49:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/#comment-650</guid>
		<description>Thanks. Just what I was looking for.

To answer AJ (a little late I know), you want to open up ActiveRecord::Base class (create a file in lib or an initializer then just do class ActiveRecord::Base) and alias the find method then use the code above and call the aliased method instead of super.

As for non-deleted in the example above you could just call ActiveRecord::Base.find directly but if you've aliased the method you'll want to call that instead.</description>
		<content:encoded><![CDATA[<p>Thanks. Just what I was looking for.</p>
<p>To answer AJ (a little late I know), you want to open up ActiveRecord::Base class (create a file in lib or an initializer then just do class ActiveRecord::Base) and alias the find method then use the code above and call the aliased method instead of super.</p>
<p>As for non-deleted in the example above you could just call ActiveRecord::Base.find directly but if you&#8217;ve aliased the method you&#8217;ll want to call that instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AJ</title>
		<link>http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/#comment-49</link>
		<dc:creator>AJ</dc:creator>
		<pubDate>Sat, 28 Jun 2008 11:10:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/#comment-49</guid>
		<description>What if you want to do for all the models i.e. for ActiveRecord::Base ?? 

Also, this does not work with associations. 

So @blog.posts.find will still not retrieve only non-deleted posts even if above method is defined in posts model. How can we get over this ?

I will appreciate if you could please mail me the solution :)</description>
		<content:encoded><![CDATA[<p>What if you want to do for all the models i.e. for ActiveRecord::Base ?? </p>
<p>Also, this does not work with associations. </p>
<p>So @blog.posts.find will still not retrieve only non-deleted posts even if above method is defined in posts model. How can we get over this ?</p>
<p>I will appreciate if you could please mail me the solution <img src='http://www.freezzo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
