Searching across multiple models and joining results?

3 views
Skip to first unread message

Arachnd

unread,
Dec 16, 2009, 3:59:22 AM12/16/09
to Searchlogic
Let's say you have listings, makes and categories.

How would I tackle the following? These all happen off of links by the
way, not a form really. Just a link with parameters.

Let's say I want to show all listings in x-y price range (I got this
part figured out)

%li= link_to '$1,000-$9,000', listings_path({:search =>
{:price_greater_than => '999', :price_less_than => '9001'}})
%li= link_to '$9,000-$20,000', listings_path({:search =>
{:price_greater_than => '8999', :price_less_than => '20001'}})
%li= link_to '$20,000-$35,000', listings_path({:search =>
{:price_greater_than => '19999', :price_less_than => '35001'}})
%li= link_to '$35,000-$50,000', listings_path({:search =>
{:price_greater_than => '34999', :price_less_than => '50001'}})

Now how would I join this with the ability to show all listings for a
given make that they belong to? This would happen in a different set
of links. I'd also like to join this on categories as well.

Any hints/tips/direction?

Thanks!
Reply all
Reply to author
Forward
0 new messages