<?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: Named Scopes Are Awesome</title>
	<atom:link href="http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/</link>
	<description>Running commentary about agile development, user experience design and Ajax.</description>
	<pubDate>Fri, 09 Jan 2009 08:20:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Pathfinder Development &#187; Dealing With A Legacy</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-4493</link>
		<dc:creator>Pathfinder Development &#187; Dealing With A Legacy</dc:creator>
		<pubDate>Tue, 16 Dec 2008 17:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-4493</guid>
		<description>[...] I did just recently move a legacy site from 2.0.2 to 2.1, primarily for gem bundling and because named scopes are awesome. You need to be careful with this -- there aren't many compatibility issues from 2.0.x to 2.1, but [...]</description>
		<content:encoded><![CDATA[<p>[...] I did just recently move a legacy site from 2.0.2 to 2.1, primarily for gem bundling and because named scopes are awesome. You need to be careful with this &#8212; there aren&#8217;t many compatibility issues from 2.0.x to 2.1, but [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Motte &#187; Blog Archive &#187; Named Scopes</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-3203</link>
		<dc:creator>Scott Motte &#187; Blog Archive &#187; Named Scopes</dc:creator>
		<pubDate>Wed, 27 Aug 2008 23:00:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-3203</guid>
		<description>[...] Great resource on named scopes [...]</description>
		<content:encoded><![CDATA[<p>[...] Great resource on named scopes [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luca Guidi</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2763</link>
		<dc:creator>Luca Guidi</dc:creator>
		<pubDate>Tue, 05 Aug 2008 12:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2763</guid>
		<description>@Karl lambda allows the lazy evaluation of that code, a block would be ran at loading time..</description>
		<content:encoded><![CDATA[<p>@Karl lambda allows the lazy evaluation of that code, a block would be ran at loading time..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-07-10 &#124; iLenceel</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2356</link>
		<dc:creator>links for 2008-07-10 &#124; iLenceel</dc:creator>
		<pubDate>Thu, 10 Jul 2008 22:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2356</guid>
		<description>[...] Pathfinder Development Round Two... [...]</description>
		<content:encoded><![CDATA[<p>[...] Pathfinder Development Round Two&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DotMana &#187; &#187; News from RoR world</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2347</link>
		<dc:creator>DotMana &#187; &#187; News from RoR world</dc:creator>
		<pubDate>Thu, 10 Jul 2008 13:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2347</guid>
		<description>[...] Named scopes in Rails 2.1 : imagine you can get all your recent active users by user.recent.active ? Take a look to this awesome feature. [...]</description>
		<content:encoded><![CDATA[<p>[...] Named scopes in Rails 2.1 : imagine you can get all your recent active users by user.recent.active ? Take a look to this awesome feature. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew Blas</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2233</link>
		<dc:creator>Drew Blas</dc:creator>
		<pubDate>Sat, 28 Jun 2008 00:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2233</guid>
		<description>Am I missing something or is: "lower(#{column}) LIKE ?", "%#{text.downcase}%" opening up the query to sql injection if you pass in something from the user, like: Model.contains(:name, params[:name]).  I believe we'd want this instead:
"lower(#{column}) LIKE ?", "%#{connection.quote_string(text.downcase)}%"</description>
		<content:encoded><![CDATA[<p>Am I missing something or is: &#8220;lower(#{column}) LIKE ?&#8221;, &#8220;%#{text.downcase}%&#8221; opening up the query to sql injection if you pass in something from the user, like: Model.contains(:name, params[:name]).  I believe we&#8217;d want this instead:<br />
&#8220;lower(#{column}) LIKE ?&#8221;, &#8220;%#{connection.quote_string(text.downcase)}%&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pathfinder Development &#187; More Named Scope Awesomeness</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2227</link>
		<dc:creator>Pathfinder Development &#187; More Named Scope Awesomeness</dc:creator>
		<pubDate>Fri, 27 Jun 2008 19:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2227</guid>
		<description>[...] other words, you can augment the contains scope introduced in last week's post with a regular find method like [...]</description>
		<content:encoded><![CDATA[<p>[...] other words, you can augment the contains scope introduced in last week&#8217;s post with a regular find method like [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Britt</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2221</link>
		<dc:creator>Britt</dc:creator>
		<pubDate>Thu, 26 Jun 2008 17:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2221</guid>
		<description>Um, just a distinction... In all your examples don't you mean to use User instead of user?  Your calling the method on the Model, not an instance?  Correct me if I'm wrong.</description>
		<content:encoded><![CDATA[<p>Um, just a distinction&#8230; In all your examples don&#8217;t you mean to use User instead of user?  Your calling the method on the Model, not an instance?  Correct me if I&#8217;m wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Christenson II</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2219</link>
		<dc:creator>Michael Christenson II</dc:creator>
		<pubDate>Thu, 26 Jun 2008 14:58:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2219</guid>
		<description>Don't forget how well this blends into things like pagination:


&lt;code&gt;
@users = User.active.by_name.paginate(
      :page =&#62; params[:page],
      :order         =&#62; 'created_on DESC', 
      :per_page     =&#62; (params[:users_per_page] &#124;&#124; 12)
    )
&lt;/code&gt;


For example :)

I also like how I could pull an array as well (without making a new named_scope or tinkering with sorts):


&lt;code&gt;
@users = User.active.by_name[0..3]
&lt;/code&gt;


I'm glad this made it into production.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget how well this blends into things like pagination:</p>
<p><code><br />
@users = User.active.by_name.paginate(<br />
      :page =&gt; params[:page],<br />
      :order         =&gt; &#8216;created_on DESC&#8217;,<br />
      :per_page     =&gt; (params[:users_per_page] || 12)<br />
    )<br />
</code></p>
<p>For example <img src='http://www.pathf.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I also like how I could pull an array as well (without making a new named_scope or tinkering with sorts):</p>
<p><code><br />
@users = User.active.by_name[0..3]<br />
</code></p>
<p>I&#8217;m glad this made it into production.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darragh Curran</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2157</link>
		<dc:creator>Darragh Curran</dc:creator>
		<pubDate>Sat, 21 Jun 2008 12:05:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2157</guid>
		<description>Nice post - I'm loving named_scope aswell - realised the other day that it's easy to use them with has_many associations.</description>
		<content:encoded><![CDATA[<p>Nice post - I&#8217;m loving named_scope aswell - realised the other day that it&#8217;s easy to use them with has_many associations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-06-21 &#124; Libin Pan</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2154</link>
		<dc:creator>links for 2008-06-21 &#124; Libin Pan</dc:creator>
		<pubDate>Sat, 21 Jun 2008 06:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2154</guid>
		<description>[...] Pathfinder Development » Named Scopes Are Awesome Named Scopes Are Awesome (tags: activerecord rails ruby)     SHARETHIS.addEntry({ title: "links for 2008-06-21", url: "http://blog.libinpan.com/2008/06/21/links-for-2008-06-21/" }); [...]</description>
		<content:encoded><![CDATA[<p>[...] Pathfinder Development » Named Scopes Are Awesome Named Scopes Are Awesome (tags: activerecord rails ruby)     SHARETHIS.addEntry({ title: &#8220;links for 2008-06-21&#8243;, url: &#8220;http://blog.libinpan.com/2008/06/21/links-for-2008-06-21/&#8221; }); [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry Bailey</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2148</link>
		<dc:creator>Harry Bailey</dc:creator>
		<pubDate>Fri, 20 Jun 2008 23:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2148</guid>
		<description>Nice article. I've been putting off upgrading my 1.x application, but you've just given me more incentive to do so.</description>
		<content:encoded><![CDATA[<p>Nice article. I&#8217;ve been putting off upgrading my 1.x application, but you&#8217;ve just given me more incentive to do so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/#comment-2147</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Fri, 20 Jun 2008 22:57:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-2147</guid>
		<description>Gotta love 'em!

I hope for round two, they get rid of the 'lamba' nonsense and just accept a &#38;block. Much more rails-ish.</description>
		<content:encoded><![CDATA[<p>Gotta love &#8216;em!</p>
<p>I hope for round two, they get rid of the &#8216;lamba&#8217; nonsense and just accept a &amp;block. Much more rails-ish.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
