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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi.. Use this... http://www.workingwithrails.com/railsplugin/4648-acts-as-ferret -Shyam On Wed, Apr 28, 2010 at 6:24 PM, swetha <swetha.anguluri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
So you''re using SearchLogic? On Apr 28, 6:54 am, swetha <swetha.angul...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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| %> <p> Username: <br /> <%= f.text_field :username_like %> </p> <%= f.submit ''Search'' %> <% end %> I hope this helps. Let me know if you have any questions. On Apr 28, 6:54 am, swetha <swetha.angul...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.