# Ferret page up to date?

**URL:** <https://www.ruby-forum.com/t/ferret-page-up-to-date/137671>\
**Category:** Ferret\
**Created:** [May 15, 2008, 6:58am UTC](https://www.ruby-forum.com/t/ferret-page-up-to-date/137671 "2008-05-15T06:58:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@taro](https://www.ruby-forum.com/u/taro)\
**Post date:** [May 15, 2008, 6:58am UTC](https://www.ruby-forum.com/t/ferret-page-up-to-date/137671/1 "2008-05-15T06:58:53Z")

</div>

Is the page at [http://projects.jkraemer.net/acts\_as\_ferret/](http://projects.jkraemer.net/acts_as_ferret/) up-to-date  
as far as setting up aaf? I followed the steps, but have a hard time  
getting searches to work. After lots of googling and trying other  
things, now I don’t get fatal errors but I don’t get any results. I’m  
just trying to figure out where is the best example to use.

My app only has one table so it should be really simple. My controller  
says:

def get\_results  
#we’ll handle over the search\_term to the view for following  
paginator searches  
if (params[:search])  
@search\_term = params[:search][:search\_term]  
else # is it a paginator search?  
@search\_term = params[:search\_term]  
end  
Question.find\_with\_ferret(@search\_term, {:page=\> 1, :per\_page =\>  
15 }, {})

end

And my model says:

class Question \< ActiveRecord::Base  
acts\_as\_ferret :fields=\> [:name, :answer], :remote=\>true  
…

So the find\_with\_ferret is mixed in, and I _think_ there’s stuff in the  
index.

Thank you. I’m pretty new to this stuff (ruby, rails, aaf).

---

<div class="post-metadata">

**Author:** ![taro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@taro](https://www.ruby-forum.com/u/taro)\
**Post date:** [May 20, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/ferret-page-up-to-date/137671/2 "2008-05-20T23:59:10Z")

</div>

After several failed attempts, I decided to give this a rest. I just  
tried aaf again and this time just wrote a unit test for it, no view. I  
can see aaf working finally! I’m really happy. I installed aaf as a gem  
and ran aaf\_install. Currently search is set for one model only.

Thanks again.

Taro Fu wrote:

> Is the page at [http://projects.jkraemer.net/acts\_as\_ferret/](http://projects.jkraemer.net/acts_as_ferret/) up-to-date  
> as far as setting up aaf? I followed the steps, but have a hard time  
> getting searches to work. After lots of googling and trying other  
> things, now I don’t get fatal errors but I don’t get any results. I’m  
> just trying to figure out where is the best example to use.
> 
> My app only has one table so it should be really simple. My controller  
> says:
> 
> def get\_results  
> #we’ll handle over the search\_term to the view for following  
> paginator searches  
> if (params[:search])  
> @search\_term = params[:search][:search\_term]  
> else # is it a paginator search?  
> @search\_term = params[:search\_term]  
> end  
> Question.find\_with\_ferret(@search\_term, {:page=\> 1, :per\_page =\>  
> 15 }, {})
> 
> end
> 
> And my model says:
> 
> class Question \< ActiveRecord::Base  
> acts\_as\_ferret :fields=\> [:name, :answer], :remote=\>true  
> …
> 
> So the find\_with\_ferret is mixed in, and I _think_ there’s stuff in the  
> index.
> 
> Thank you. I’m pretty new to this stuff (ruby, rails, aaf).
