Ferret page up to date?

Is the page at 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).

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/ 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).

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs