search for: show_search

Displaying 3 results from an estimated 3 matches for "show_search".

2006 Jun 13
9
Find DB items by "title"
...hat points to this action in my "post_controller.rb" def search @post = Post.find_all_by_title(params[:title]) end Which I think is assigning the @post variable with the results. But how exactly can I get them to display? I made a dummy action in the post_contoller.rb called "show_search" and a view called "show_search.rhtml" what''s the last step to get the results to display? -- Posted via http://www.ruby-forum.com/.
2006 Jun 14
1
Partial matches with find_by
I have a form passing a parameter to a "show_search" action. Everything goes fine, as long as i search for the exact title of the post. How do I do a partial or "wild card" search? Code below: def show_search @posts = Post.find_all_by_title(params[:title]) end -- Posted via http://www.ruby-forum.com/.
2006 Jun 25
1
Using AND in :conditions queries
...ing input from a form. Everything works fine when looking for "title" or "body" But, when I want to couple that with an AND statement the search still works fine, but it seems to disregard the AND statements. Code below: In the view: <%= start_form_tag :action=> "show_search" %> <h3>Search</h3> <b>Keywords: </b> <input type=text name="query"> <b>Location: </b> <input type=text name="query_location"> <input type="submit" value="Search &#1...