<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: acts_as_ferret pagination</title>
	<atom:link href="http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/feed/" rel="self" type="application/rss+xml" />
	<link>http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/</link>
	<description>Development-related blog</description>
	<lastBuildDate>Sun, 08 Nov 2009 12:59:54 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-78</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 24 Apr 2009 01:09:14 +0000</pubDate>
		<guid isPermaLink="false">http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-78</guid>
		<description>In Rails 2.3 you have to make sure you load acts_as_ferret, will_paginate, and the patch in the right order.  In order for me to get this working, I had to put require &#039;acts_as_ferret&#039;  above the initialize  loop in environment.rb.  If I didn&#039;t, the patch would load before acts_as_ferret and result in an error.</description>
		<content:encoded><![CDATA[<p>In Rails 2.3 you have to make sure you load acts_as_ferret, will_paginate, and the patch in the right order.  In order for me to get this working, I had to put require &#8216;acts_as_ferret&#8217;  above the initialize  loop in environment.rb.  If I didn&#8217;t, the patch would load before acts_as_ferret and result in an error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-76</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Thu, 22 Jan 2009 21:44:59 +0000</pubDate>
		<guid isPermaLink="false">http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-76</guid>
		<description>You might want to try to use less magic and monkey patching, and just use the two APIs together.

def self.paginate_by_contents(term, opts)
    self.paginate(term, {:finder =&gt; &quot;find_by_contents&quot;, :total_entries =&gt; self.total_hits(term)}.merge(opts &#124;&#124; {}))
end</description>
		<content:encoded><![CDATA[<p>You might want to try to use less magic and monkey patching, and just use the two APIs together.</p>
<p>def self.paginate_by_contents(term, opts)<br />
    self.paginate(term, {:finder =&gt; &#8220;find_by_contents&#8221;, :total_entries =&gt; self.total_hits(term)}.merge(opts || {}))<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liam</title>
		<link>http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-56</link>
		<dc:creator>Liam</dc:creator>
		<pubDate>Fri, 04 Jul 2008 02:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-56</guid>
		<description>Thanks for your reply! 

I tried your suggestion and all the errors went away, however, all my search queries turn up nothing. Every single search combo in the console returns:



I decided to uninstall will_paginate plugin and install the mislav-will_paginate gem and use the built in pagination of ferret with the following method:

http://www.jumbabox.com/2008/05/acts_as_ferret-tutorial/

Unfortunately, that technique also returns nothing when I run a query... Given that the null findings occured in the new technique and the technique you suggested I was wondering if you have any ideas on how to remedy it?</description>
		<content:encoded><![CDATA[<p>Thanks for your reply! </p>
<p>I tried your suggestion and all the errors went away, however, all my search queries turn up nothing. Every single search combo in the console returns:</p>
<p>I decided to uninstall will_paginate plugin and install the mislav-will_paginate gem and use the built in pagination of ferret with the following method:</p>
<p><a href="http://www.jumbabox.com/2008/05/acts_as_ferret-tutorial/" rel="nofollow">http://www.jumbabox.com/2008/05/acts_as_ferret-tutorial/</a></p>
<p>Unfortunately, that technique also returns nothing when I run a query&#8230; Given that the null findings occured in the new technique and the technique you suggested I was wondering if you have any ideas on how to remedy it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thirstydoh</title>
		<link>http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-55</link>
		<dc:creator>thirstydoh</dc:creator>
		<pubDate>Tue, 01 Jul 2008 15:52:18 +0000</pubDate>
		<guid isPermaLink="false">http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-55</guid>
		<description>Looks like the patch file is not loaded. You need to put its name into vendor/plugins/patches/init.rb file, like this:

require &#039;aaf_pagination&#039;

Note you don&#039;t need to mention lib directory there, it&#039;s searched automatically.</description>
		<content:encoded><![CDATA[<p>Looks like the patch file is not loaded. You need to put its name into vendor/plugins/patches/init.rb file, like this:</p>
<p>require &#8216;aaf_pagination&#8217;</p>
<p>Note you don&#8217;t need to mention lib directory there, it&#8217;s searched automatically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liam</title>
		<link>http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-54</link>
		<dc:creator>Liam</dc:creator>
		<pubDate>Sat, 28 Jun 2008 20:23:56 +0000</pubDate>
		<guid isPermaLink="false">http://thirstydoh.wordpress.com/2008/01/17/acts_as_ferret-pagination/#comment-54</guid>
		<description>I placed the first set of code that you posted into &#039;vendor/plugins/patches/lib&#039; and then entered the following in the console (after restarting the console). Any clues to what&#039;s wrong here?

t = Post.paginate_by_contents(&#039;test&#039;, :total_entries =&gt; 10, :page =&gt; 1,  :per_page =&gt; 2)
NoMethodError: undefined method `find_all_by_contents&#039; for #
	from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1613:in `method_missing_without_paginate&#039;
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:164:in `method_missing&#039;
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:82:in `send&#039;
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:82:in `paginate&#039;
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/collection.rb:87:in `create&#039;
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:76:in `paginate&#039;
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:177:in `method_missing&#039;
	from (irb):1</description>
		<content:encoded><![CDATA[<p>I placed the first set of code that you posted into &#8216;vendor/plugins/patches/lib&#8217; and then entered the following in the console (after restarting the console). Any clues to what&#8217;s wrong here?</p>
<p>t = Post.paginate_by_contents(&#8216;test&#8217;, :total_entries =&gt; 10, :page =&gt; 1,  :per_page =&gt; 2)<br />
NoMethodError: undefined method `find_all_by_contents&#8217; for #<br />
	from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1613:in `method_missing_without_paginate&#8217;<br />
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:164:in `method_missing&#8217;<br />
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:82:in `send&#8217;<br />
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:82:in `paginate&#8217;<br />
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/collection.rb:87:in `create&#8217;<br />
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:76:in `paginate&#8217;<br />
	from /Users/liamks/Documents/programs/rails/liamkaufman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:177:in `method_missing&#8217;<br />
	from (irb):1</p>
]]></content:encoded>
	</item>
</channel>
</rss>
