<?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: Eager Find by SQL Pagination in Rails</title>
	<atom:link href="http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Sun, 05 Jul 2009 00:50:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anthony</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-2/#comment-174117</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Tue, 03 Mar 2009 15:55:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-174117</guid>
		<description>Hello, 

the link to file eager_custom_load.rb doesn't work anymore.  Can fix it or send me the file pls?

many thx</description>
		<content:encoded><![CDATA[<p>Hello, </p>
<p>the link to file eager_custom_load.rb doesn&#8217;t work anymore.  Can fix it or send me the file pls?</p>
<p>many thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeba</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-2/#comment-161667</link>
		<dc:creator>Zeba</dc:creator>
		<pubDate>Tue, 20 Jan 2009 06:29:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-161667</guid>
		<description>Thank you so much for this...
I've been looking for such a solution since days....and my search has ended at last...  :).
THANK YOU...</description>
		<content:encoded><![CDATA[<p>Thank you so much for this&#8230;<br />
I&#8217;ve been looking for such a solution since days&#8230;.and my search has ended at last&#8230;  :).<br />
THANK YOU&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-102485</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Wed, 16 Apr 2008 06:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-102485</guid>
		<description>Terrell, thanks for the sharing the fix, much appreciated!</description>
		<content:encoded><![CDATA[<p>Terrell, thanks for the sharing the fix, much appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terrell</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-102400</link>
		<dc:creator>Terrell</dc:creator>
		<pubDate>Sat, 12 Apr 2008 14:45:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-102400</guid>
		<description>Ilya, I was seeing the LIMIT -X,X behavior as well (same as Yves back in Jan07).  The offset was being set to a negative when params[:current] is nil on the initial default passthrough.  I added a simple check to get the offset back to 0 in that case - there's probably a more elegant solution...

&lt;code&gt;
 # calculate the right offset values for current page and page_size
 offset = (options[:current].to_i - 1) * options[:page_size]
 offset = 0 if offset &lt; 0 # was seeing "LIMIT -X,X" by default
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Ilya, I was seeing the LIMIT -X,X behavior as well (same as Yves back in Jan07).  The offset was being set to a negative when params[:current] is nil on the initial default passthrough.  I added a simple check to get the offset back to 0 in that case - there&#8217;s probably a more elegant solution&#8230;</p>
<p><code><br />
 # calculate the right offset values for current page and page_size<br />
 offset = (options[:current].to_i - 1) * options[:page_size]<br />
 offset = 0 if offset &lt; 0 # was seeing &#8220;LIMIT -X,X&#8221; by default<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-102322</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Mon, 07 Apr 2008 11:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-102322</guid>
		<description>Neal, glad you got it working!</description>
		<content:encoded><![CDATA[<p>Neal, glad you got it working!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neal Harmon</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-102313</link>
		<dc:creator>Neal Harmon</dc:creator>
		<pubDate>Sat, 05 Apr 2008 03:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-102313</guid>
		<description>Nevermind. I was passing in get variables that were hashes and paginating_find doesn't support those. I've changed my form so that it doesn't submit those and it's working great.

Thanks for the code Ilya!</description>
		<content:encoded><![CDATA[<p>Nevermind. I was passing in get variables that were hashes and paginating_find doesn&#8217;t support those. I&#8217;ve changed my form so that it doesn&#8217;t submit those and it&#8217;s working great.</p>
<p>Thanks for the code Ilya!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neal Harmon</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-102312</link>
		<dc:creator>Neal Harmon</dc:creator>
		<pubDate>Sat, 05 Apr 2008 00:08:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-102312</guid>
		<description>What if I want to add params to this solution? 

www.url.com/?page=2&amp;myvariable=123

I can't figure out how to get that in there. What am I missing?</description>
		<content:encoded><![CDATA[<p>What if I want to add params to this solution? </p>
<p><a href="http://www.url.com/?page=2&amp;myvariable=123" rel="nofollow">http://www.url.com/?page=2&amp;myvariable=123</a></p>
<p>I can&#8217;t figure out how to get that in there. What am I missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-101256</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Thu, 31 Jan 2008 06:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-101256</guid>
		<description>Doh, fixed the swapped variables names in the post. Thanks Alan.</description>
		<content:encoded><![CDATA[<p>Doh, fixed the swapped variables names in the post. Thanks Alan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-101235</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Tue, 29 Jan 2008 23:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-101235</guid>
		<description>Am I the only one who noticed this?
&lt;code&gt;LIMIT #{offset} OFFSET #{limit}"&lt;/code&gt;
The variables are mixed up. Just spent 20 minutes trying to figure out why my PEs were empty. Grrr ...</description>
		<content:encoded><![CDATA[<p>Am I the only one who noticed this?<br />
<code>LIMIT #{offset} OFFSET #{limit}"</code><br />
The variables are mixed up. Just spent 20 minutes trying to figure out why my PEs were empty. Grrr &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://www.igvita.com/2006/09/22/eager-find-by-sql-pagination-in-rails/comment-page-1/#comment-101111</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Mon, 21 Jan 2008 05:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2006/09/22/eager-find-by-sql-pagination-in-rails/#comment-101111</guid>
		<description>Thanks for your valuable suggestion !</description>
		<content:encoded><![CDATA[<p>Thanks for your valuable suggestion !</p>
]]></content:encoded>
	</item>
</channel>
</rss>
