cornelius wilson <lists@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])
>
> Also a quick note I am following the railscast 111 for this.
>
> Attachments:
> http://www.ruby-forum.com/attachment/8535/searches_controller.rb
> http://www.ruby-forum.com/attachment/8536/user.rb
> http://www.ruby-forum.com/attachment/8537/search.rb
What's in the searches table? How are you populating it to do a
Search.find? I'm a wee bit unclear why there's a Search model at all,
really...
--
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+unsubscribe@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/51c963ec.e6a4320a.3064.721d%40mx.google.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment