<?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: 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>Tue, 16 Mar 2010 13:08:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/comment-page-3/#comment-151221</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Sun, 07 Dec 2008 01:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-151221</guid>
		<description>Sachin, it's hard to say what the problem is. What is at line 50 in paging_enumerator.rb? Also, the code in the blog post is definitely outdated, there may have been changes to the underlying libraries since.. Have you tried looking at integrating will_paginate &amp; ferret?</description>
		<content:encoded><![CDATA[<p>Sachin, it&#8217;s hard to say what the problem is. What is at line 50 in paging_enumerator.rb? Also, the code in the blog post is definitely outdated, there may have been changes to the underlying libraries since.. Have you tried looking at integrating will_paginate &#038; ferret?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sachin choudhary</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/comment-page-3/#comment-150778</link>
		<dc:creator>sachin choudhary</dc:creator>
		<pubDate>Thu, 04 Dec 2008 11:46:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-150778</guid>
		<description>Hi ilya,

I tried to use your ferret pagination in rails, but getting some error, I tell you what i did, i pasted your two methods in pagination_find.rb file and tries to run it from console

The commands which i typed are ;-
1.  articles = Article.paginating_ferret_search({:q=&gt;"article",:page_size =&gt; 10, :current =&gt; 1})

it returns me the result like 
 #&lt;PagingEnumerator:0xb5aa92a8 @stop_page=1, @page_count=4, @last_page=4, @callback=#, @auto=false, @size=32, @first_page=1, @page_size=10, @page=1&gt;

after that i tries to print the title of the articles like this:-
articles.each do&#124;a&#124;
puts a.title
end

The result prints as  :- 
create new article new
create new article new
create new article new
create new article new
create new article new
create new article new
create new article new
create new article new
create new article new
create new article new
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.&lt;
	from /home/sachin/workplace/vivanista2/trunk/vendor/plugins/paginating_find/lib/paging_enumerator.rb:50:in `each'
	from (irb):35

this prints the title of the articles but didn't comes out from the loop and give an error.


Please help me out it very critical</description>
		<content:encoded><![CDATA[<p>Hi ilya,</p>
<p>I tried to use your ferret pagination in rails, but getting some error, I tell you what i did, i pasted your two methods in pagination_find.rb file and tries to run it from console</p>
<p>The commands which i typed are ;-<br />
1.  articles = Article.paginating_ferret_search({:q=&gt;&#8221;article&#8221;,:page_size =&gt; 10, :current =&gt; 1})</p>
<p>it returns me the result like<br />
 #&lt;PagingEnumerator:0xb5aa92a8 @stop_page=1, @page_count=4, @last_page=4, @callback=#, @auto=false, @size=32, @first_page=1, @page_size=10, @page=1&gt;</p>
<p>after that i tries to print the title of the articles like this:-<br />
articles.each do|a|<br />
puts a.title<br />
end</p>
<p>The result prints as  :-<br />
create new article new<br />
create new article new<br />
create new article new<br />
create new article new<br />
create new article new<br />
create new article new<br />
create new article new<br />
create new article new<br />
create new article new<br />
create new article new<br />
NoMethodError: You have a nil object when you didn&#8217;t expect it!<br />
The error occurred while evaluating nil.&lt;<br />
	from /home/sachin/workplace/vivanista2/trunk/vendor/plugins/paginating_find/lib/paging_enumerator.rb:50:in `each&#8217;<br />
	from (irb):35</p>
<p>this prints the title of the articles but didn&#8217;t comes out from the loop and give an error.</p>
<p>Please help me out it very critical</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lyes</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/comment-page-3/#comment-142195</link>
		<dc:creator>Lyes</dc:creator>
		<pubDate>Thu, 30 Oct 2008 15:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/02/20/ferret-pagination-in-rails/#comment-142195</guid>
		<description>Hello!
it seems be very interesting what you've made here, But I want to now in each part of the view code the result is displayed?

thank you</description>
		<content:encoded><![CDATA[<p>Hello!<br />
it seems be very interesting what you&#8217;ve made here, But I want to now in each part of the view code the result is displayed?</p>
<p>thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/02/20/ferret-pagination-in-rails/comment-page-3/#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-page-3/#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&amp;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-page-3/#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-page-3/#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 =&gt; @collection) %&gt;

is now...

 "results", :locals =&gt; {:collection =&gt; @collection}) %&gt;</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-page-3/#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-page-3/#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-page-3/#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 &lt; :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>
</channel>
</rss>
