Topic: Want an Advanced Search

I wanted to create and advanced search that looks like:

Select Dropdown List (Book)
Select Dropdown List (Category)
Select Dropdown List (SubCategory)
Select Dropdown List (Author)
Input Field (Keyword)

Select *.b, *.c, *.a
from book b, category c, author a
where book = form.book_id
and category = form.category_id
and subcategory = form.subcategory_id
and author = form.author
and keyword = form.keyword

Is this possible in Rails?

=====================
Sam G.

Re: Want an Advanced Search

Yep. Look into using select_tag with options_from_collection_for_select. Then you just need to pass the params into the find :conditions when the form is submitted.

Railscasts - Free Ruby on Rails Screencasts

Re: Want an Advanced Search

Thanks, Ryan.

I also saw your newest RailsCasts on Simple Searches. It gave me some ideas too.

=====================
Sam G.