On 24 June 2013 20:05, cornelius wilson <li...@ruby-forum.com> wrote: > I have been working on the search form for my app. The advanced search > works fine, however I am unable to get the regular search form to work. > It should be able to search the entire user database, and I should be > able to string keywords together. For example if I search the term "no > kids" it should return the results for everyone who has "no kids" listed > on their profile. Then if I want to be more advance I can search "no > kids, asian" and this would of course pull up users with Asian ethnicity > that has no kids. > > When I do this I get the following error: Couldn't find Search with > id=kids. It points to the searches controller for the following line: > > def index > @search = Search.find(params[:search])
find expects a numeric id value, presumable params[:search] is set to "kids" rather than an id. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsKPvhdjHG9xKm-FaTzBrDsr%2B0bX%3DRJiF7ErbT_cCi0Tw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.