Forum: Ruby on Rails ferret not working after upgrade

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
97bd2f0974055dacf53a0643b013b32e?d=identicon&s=25 Petan Cert (petan)
on 2008-12-13 22:35
After a recent upgrade to a newer ferret version and acts_as_ferret
plugin, searching is not working any more.

I have changed find_by_contents to find_with_ferret, but it still doesnt
work. :(

user.rb
acts_as_ferret({:fields => ['username', 'lastname', 'town'})

search form.rhtml
<% form_tag({ :action => "search" }, :method => "get") do %>
    <%= text_field_tag "q", params[:q] %>
    <%= submit_tag "Search" %>
<% end %>

controller:
def search
    if params[:q]
  @users = User.find_with_ferret(params[:q])
    end
end

Any help would be most welcome.
Thank you.
This topic is locked and can not be replied to.