Simple search

I need help with simple search .I worked on railscasts example,but its
not working.
Can anyone give me an example of simple search logic.Thanks in Advance

Hi…
Use this…

http://www.workingwithrails.com/railsplugin/4648-acts-as-ferret

-Shyam

So you’re using SearchLogic?

You want to take a look at the SearchLogic GitHub Readme page:
http://github.com/binarylogic/searchlogic

So in your controller, you’ll want something like:

class UsersController < ApplicationController
def index
@search = User.search(params[:search])
@users = @search.all
end
end

And in the view, SearchLogic comes with built in named scopes to
search.

So let’s say you were working with users. And lets say you want to
search on the username.

<% form_for @search do |f| %>

Username:
<%= f.text_field :username_like %>

<%= f.submit 'Search' %> <% end %>

I hope this helps. Let me know if you have any questions.