Why not post your code so we can take a look at the logic?
Regards,
Dave
Why not post your code so we can take a look at the logic?
Regards,
Dave
use something like the following:
def results conditions = "true" par =
unless params[:filtera1].blank? conditions << " and filtera = ?" par << params[:filtera1] end
unless params[:filtera2].blank? conditions << " or filtera = ?" par << params[:filtera2] end
unless params[:filtera3].blank? conditions << " or filtera = ?" par << params[:filtera3] end
@results = Place.find(:all, :conditions => [conditions] + par) end
or use a plugin such as criteria_query (http://www.muermann.org/ruby/criteria_query/)
Mike