<?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: 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>
	<lastBuildDate>Fri, 05 Mar 2010 19:33:43 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: telefon dinleme</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/comment-page-1/#comment-7208</link>
		<dc:creator>telefon dinleme</dc:creator>
		<pubDate>Sun, 09 Aug 2009 08:03:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-7208</guid>
		<description>[...] a named scope does in Rails, in Django terms, is allow you to name a given query and use it as a base thanks</description>
		<content:encoded><![CDATA[<p>[...] a named scope does in Rails, in Django terms, is allow you to name a given query and use it as a base thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Named Scopes for Django : Furry Brains</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/comment-page-1/#comment-6779</link>
		<dc:creator>Named Scopes for Django : Furry Brains</dc:creator>
		<pubDate>Mon, 22 Jun 2009 16:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=981#comment-6779</guid>
		<description>[...] a named scope does in Rails, in Django terms, is allow you to name a given query and use it as a base, or [...]</description>
		<content:encoded><![CDATA[<p>[...] a named scope does in Rails, in Django terms, is allow you to name a given query and use it as a base, or [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pathfinder Development &#187; Dealing With A Legacy</title>
		<link>http://www.pathf.com/blogs/2008/06/named-scopes-are-awesome/comment-page-1/#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&#039;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-page-1/#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-page-1/#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-page-1/#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-page-1/#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-page-1/#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: &quot;lower(#{column}) LIKE ?&quot;, &quot;%#{text.downcase}%&quot; opening up the query to sql injection if you pass in something from the user, like: Model.contains(:name, params[:name]).  I believe we&#039;d want this instead:
&quot;lower(#{column}) LIKE ?&quot;, &quot;%#{connection.quote_string(text.downcase)}%&quot;</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-page-1/#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&#039;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-page-1/#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&#039;t you mean to use User instead of user?  Your calling the method on the Model, not an instance?  Correct me if I&#039;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-page-1/#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&#039;t forget how well this blends into things like pagination:


&lt;code&gt;
@users = User.active.by_name.paginate(
      :page =&gt; params[:page],
      :order         =&gt; &#039;created_on DESC&#039;, 
      :per_page     =&gt; (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&#039;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 />
      <img src='http://www.pathf.com/blogs/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> rder         =&gt; 'created_on DESC',<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-page-1/#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&#039;m loving named_scope aswell - realised the other day that it&#039;s easy to use them with has_many associations.</description>
		<content:encoded><![CDATA[<p>Nice post &#8211; I&#8217;m loving named_scope aswell &#8211; 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-page-1/#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: &quot;links for 2008-06-21&quot;, url: &quot;http://blog.libinpan.com/2008/06/21/links-for-2008-06-21/&quot; }); [...]</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-page-1/#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&#039;ve been putting off upgrading my 1.x application, but you&#039;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-page-1/#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 &#039;em!

I hope for round two, they get rid of the &#039;lamba&#039; nonsense and just accept a &amp;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>

<!-- Dynamic page generated in 0.300 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-19 18:10:02 -->
