I have a rails app that lists different law firms. These law firms can be categorized by Practice Area and Location. Now i need to implement a search, where people can select from a select option a Location AND a Practice Area and find all Law Firms that are in that selected Location which also Practice in the selected Area, any idea? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5ba1e91e-9538-4585-a621-92d1bf986ac2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Just use the boolean operator "AND" in your search query. This should work both for simple SQL queries on your database and for queries on hosted search servers which ( thinking sphix , cloudsearch , etc ) . What have you tried so far ? On 31 August 2013 06:55, zachariah ngonyani <zachariahn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a rails app that lists different law firms. These law firms can be > categorized by Practice Area and Location. Now i need to implement a > search, where people can select from a select option a Location AND a > Practice Area and find all Law Firms that are in that selected Location > which also Practice in the selected Area, any idea? > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/5ba1e91e-9538-4585-a621-92d1bf986ac2%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJ%3Dox-Av9FAsoTF39Bu8_Hcmr1n%2BtDkbO7h5aj3iW4UovHdxzw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
On Aug 30, 2013, at 9:25 PM, zachariah ngonyani wrote:> I have a rails app that lists different law firms. These law firms can be categorized by Practice Area and Location. Now i need to implement a search, where people can select from a select option a Location AND a Practice Area and find all Law Firms that are in that selected Location which also Practice in the selected Area, any idea? > Thanks >Are you looking for the UI where you choose from one picker and the next picker is updated with relevant sub-options from that first choice? Have a search on Railscasts for a nice breakdown of how to do that. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/E462D1EB-12ED-41FF-9183-55A4960FF3FF%40wdstudio.com. For more options, visit https://groups.google.com/groups/opt_out.