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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---