search for: search_posts

Displaying 1 result from an estimated 1 matches for "search_posts".

2006 Apr 05
8
Pass paramter via form
...gn =center><%= text_field ''search'', ''search'',"size" =>"20" %> <%= submit_tag ''Search'' %></p> <%= end_form_tag %> And below i have the def in the blog controller def search @posts = Post.search_posts(:search) @categories = Category.find(:all, :order => "name asc") @archive = Post.month_posts(4) end I cant seem to pass the value in the search textbox to the def search in the blog controller. The SQL query on the post model works fine when i input arguments myself. Code...