I have a drop down list that has a value ‘any’.
And I have this code in controller…
@results = Post.find(:all, :conditions => ‘status = ?’, @status)
If any is selected, it means search for all records. What do I need to
put in variable @status to make so that it would search for all.
I can have multiple drop down lists in future with many combinations so
I cannot if statement here.