<?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: finder_filter gem released</title>
	<atom:link href="http://matthewbass.com/2008/08/08/finder_filter-gem-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://matthewbass.com/2008/08/08/finder_filter-gem-released/</link>
	<description>Musings on software and life...</description>
	<lastBuildDate>Sat, 25 Feb 2012 01:12:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Austin Taylor</title>
		<link>http://matthewbass.com/2008/08/08/finder_filter-gem-released/comment-page-1/#comment-20026</link>
		<dc:creator>Austin Taylor</dc:creator>
		<pubDate>Tue, 12 Aug 2008 16:48:21 +0000</pubDate>
		<guid isPermaLink="false">http://matthewbass.com/2008/08/08/finder_filter-gem-released/#comment-20026</guid>
		<description>&lt;code&gt;
    def load_objects
      params.match(/id$/).each do &#124;k,v&#124;
        the_model_name = (k.to_sym == :id) ? self.class.model_name : k.to_s.gsub(/_id/, &#039;&#039;)
        instance_variable_set(the_model_name.to_sym.iv, the_model_name.classify.constantize.find(v))
      end
    rescue ActiveRecord::RecordNotFound
      redirect_to root_url
    rescue NoMethodError, NameError
      nil
    end
&lt;/code&gt;

Been using this for a while. Just set it as a before filter in application controller. It always does the right thing.</description>
		<content:encoded><![CDATA[<p><code><br />
    def load_objects<br />
      params.match(/id$/).each do |k,v|<br />
        the_model_name = (k.to_sym == :id) ? self.class.model_name : k.to_s.gsub(/_id/, '')<br />
        instance_variable_set(the_model_name.to_sym.iv, the_model_name.classify.constantize.find(v))<br />
      end<br />
    rescue ActiveRecord::RecordNotFound<br />
      redirect_to root_url<br />
    rescue NoMethodError, NameError<br />
      nil<br />
    end<br />
</code></p>
<p>Been using this for a while. Just set it as a before filter in application controller. It always does the right thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Motte &#187; Blog Archive &#187; DRYing up your controllers in rails with find_filter plugin</title>
		<link>http://matthewbass.com/2008/08/08/finder_filter-gem-released/comment-page-1/#comment-19999</link>
		<dc:creator>Scott Motte &#187; Blog Archive &#187; DRYing up your controllers in rails with find_filter plugin</dc:creator>
		<pubDate>Tue, 12 Aug 2008 02:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://matthewbass.com/2008/08/08/finder_filter-gem-released/#comment-19999</guid>
		<description>[...] http://matthewbass.com/2008/08/08/finder_filter-gem-released/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://matthewbass.com/2008/08/08/finder_filter-gem-released/" rel="nofollow">http://matthewbass.com/2008/08/08/finder_filter-gem-released/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Fresh Cup &#187; Blog Archive &#187; Double Shot #266</title>
		<link>http://matthewbass.com/2008/08/08/finder_filter-gem-released/comment-page-1/#comment-19920</link>
		<dc:creator>A Fresh Cup &#187; Blog Archive &#187; Double Shot #266</dc:creator>
		<pubDate>Mon, 11 Aug 2008 10:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://matthewbass.com/2008/08/08/finder_filter-gem-released/#comment-19920</guid>
		<description>[...] finder_filter gem released - Another way to DRY up your controllers. [...]</description>
		<content:encoded><![CDATA[<p>[...] finder_filter gem released &#8211; Another way to DRY up your controllers. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

