<?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: Ferret Pagination in Rails</title>
	<atom:link href="http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Fri, 04 Jul 2008 03:04:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101810</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Fri, 07 Mar 2008 11:58:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101810</guid>
		<description>Thanks for documenting your solution Jay!</description>
		<content:encoded><![CDATA[<p>Thanks for documenting your solution Jay!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mindtonic</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101754</link>
		<dc:creator>mindtonic</dc:creator>
		<pubDate>Mon, 03 Mar 2008 18:30:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101754</guid>
		<description>Ilya and noluckmurphy...

I was having the same trouble initially described by noluckmurphy: undefined method `multi_search’ for MyModel:Class.  I hunted down the trail of discovery and was able to solve my dilemma using your discussion.

&lt;a href="http://mindtonic.net/index.php?c=blog_entries&#38;id=28" rel="nofollow"&gt;In the end, I wrote a blog entry about it.&lt;/a&gt; Hopefully it will help others with the same troubles.

Thanks Ilya for the great code, and both of you guys for helping me solve the problem.</description>
		<content:encoded><![CDATA[<p>Ilya and noluckmurphy&#8230;</p>
<p>I was having the same trouble initially described by noluckmurphy: undefined method `multi_search’ for MyModel:Class.  I hunted down the trail of discovery and was able to solve my dilemma using your discussion.</p>
<p><a href="http://mindtonic.net/index.php?c=blog_entries&amp;id=28" rel="nofollow">In the end, I wrote a blog entry about it.</a> Hopefully it will help others with the same troubles.</p>
<p>Thanks Ilya for the great code, and both of you guys for helping me solve the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101577</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Tue, 19 Feb 2008 03:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101577</guid>
		<description>Doh! Glad you finally got it working. :)</description>
		<content:encoded><![CDATA[<p>Doh! Glad you finally got it working. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: noluckmurphy</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101564</link>
		<dc:creator>noluckmurphy</dc:creator>
		<pubDate>Sat, 16 Feb 2008 22:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101564</guid>
		<description>Fixed.  I was incorrectly passing my @collection to my partial.  Something (my guess is the callback w/in the PagingEnumerator) was causing the partial itself to be rendered multiple times (even though it wasn't inside any loops).

 "results", :collection =&#62; @collection) %&#62;

is now...

 "results", :locals =&#62; {:collection =&#62; @collection}) %&#62;</description>
		<content:encoded><![CDATA[<p>Fixed.  I was incorrectly passing my @collection to my partial.  Something (my guess is the callback w/in the PagingEnumerator) was causing the partial itself to be rendered multiple times (even though it wasn&#8217;t inside any loops).</p>
<p> &#8220;results&#8221;, :collection =&gt; @collection) %&gt;</p>
<p>is now&#8230;</p>
<p> &#8220;results&#8221;, :locals =&gt; {:collection =&gt; @collection}) %&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: noluckmurphy</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101488</link>
		<dc:creator>noluckmurphy</dc:creator>
		<pubDate>Tue, 12 Feb 2008 14:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101488</guid>
		<description>http://pastie.caboo.se/150890</description>
		<content:encoded><![CDATA[<p><a href="http://pastie.caboo.se/150890" rel="nofollow">http://pastie.caboo.se/150890</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101480</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Tue, 12 Feb 2008 11:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101480</guid>
		<description>Murphy, are you sure you don't have a rogue loop in there somewhere? :)

Take a look at the example on the &lt;a href="http://cardboardrocket.com/pages/paginating_find" rel="nofollow"&gt;plugin page&lt;/a&gt;. If all else fails, send me a link to a pastie of your current controller.</description>
		<content:encoded><![CDATA[<p>Murphy, are you sure you don&#8217;t have a rogue loop in there somewhere? :)</p>
<p>Take a look at the example on the <a href="http://cardboardrocket.com/pages/paginating_find" rel="nofollow">plugin page</a>. If all else fails, send me a link to a pastie of your current controller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: noluckmurphy</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101465</link>
		<dc:creator>noluckmurphy</dc:creator>
		<pubDate>Tue, 12 Feb 2008 04:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101465</guid>
		<description>In general, on the last page of results if there are N results (N &#60; :page_size), those results will be printed correctly N times (in the same manner as I've described above).

As far as I can tell w/ breakpoints and such, the 'each' method in paging_enumerator.rb "seems" to be working correctly--the search results are iterated and printed correctly.  But why does it happen N more times on that same page? It's blowing my mind!

Anyway, my apologies once again for my Rails/Ruby noobishness.

Thanks for all your help this far, Ilya.</description>
		<content:encoded><![CDATA[<p>In general, on the last page of results if there are N results (N &lt; :page_size), those results will be printed correctly N times (in the same manner as I&#8217;ve described above).</p>
<p>As far as I can tell w/ breakpoints and such, the &#8216;each&#8217; method in paging_enumerator.rb &#8220;seems&#8221; to be working correctly&#8211;the search results are iterated and printed correctly.  But why does it happen N more times on that same page? It&#8217;s blowing my mind!</p>
<p>Anyway, my apologies once again for my Rails/Ruby noobishness.</p>
<p>Thanks for all your help this far, Ilya.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: noluckmurphy</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101430</link>
		<dc:creator>noluckmurphy</dc:creator>
		<pubDate>Sun, 10 Feb 2008 20:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101430</guid>
		<description>Say my result set includes 11 results.  Page-size is set to 10 so this yields 2 pages.

On page one, the output is:

&lt;em&gt;
Result 1
Result 2
Result 3
...
Result 10

Result 1
Result 2
Result 3
...
Result 10

Result 1
Result 2
Result 3
...
Result 10
......
&lt;/em&gt;

This repeats until the Result 1 - 10 block is printed ten (10) times.

On page two, Result 11 is printed once (as desired). My question is...how should I be interacting with the PagingEnumerator (or its @results ActsAsFerret::SearchResults component).  In the above example, the @collection is the PagingEnumerator and @collection.results is the SearchResults component.

Sorry if I'm not using the correct terminology.  This is my first project with Rails or Ruby.</description>
		<content:encoded><![CDATA[<p>Say my result set includes 11 results.  Page-size is set to 10 so this yields 2 pages.</p>
<p>On page one, the output is:</p>
<p><em><br />
Result 1<br />
Result 2<br />
Result 3<br />
&#8230;<br />
Result 10</p>
<p>Result 1<br />
Result 2<br />
Result 3<br />
&#8230;<br />
Result 10</p>
<p>Result 1<br />
Result 2<br />
Result 3<br />
&#8230;<br />
Result 10<br />
&#8230;&#8230;<br />
</em></p>
<p>This repeats until the Result 1 - 10 block is printed ten (10) times.</p>
<p>On page two, Result 11 is printed once (as desired). My question is&#8230;how should I be interacting with the PagingEnumerator (or its @results ActsAsFerret::SearchResults component).  In the above example, the @collection is the PagingEnumerator and @collection.results is the SearchResults component.</p>
<p>Sorry if I&#8217;m not using the correct terminology.  This is my first project with Rails or Ruby.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101429</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Sun, 10 Feb 2008 20:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101429</guid>
		<description>Murphy, I'm a little confused, the problem is that the same results are printed on each page? If so, are you passing in the :page parameters correctly?</description>
		<content:encoded><![CDATA[<p>Murphy, I&#8217;m a little confused, the problem is that the same results are printed on each page? If so, are you passing in the :page parameters correctly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: noluckmurphy</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/#comment-101380</link>
		<dc:creator>noluckmurphy</dc:creator>
		<pubDate>Wed, 06 Feb 2008 22:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-101380</guid>
		<description>Wow. I screwed that up!

The view code that's missing above is

@collection.each do &#124;result&#124;
search_result_name(result)
end</description>
		<content:encoded><![CDATA[<p>Wow. I screwed that up!</p>
<p>The view code that&#8217;s missing above is</p>
<p>@collection.each do |result|<br />
search_result_name(result)<br />
end</p>
]]></content:encoded>
	</item>
</channel>
</rss>
