Hello, How do you handle advanced searches in Rails, i.e., anything more than one field? I searched the archives but wasn't able to find a good example of this. [I also noticed the forum itself has no advanced search yet!] This is another of those common scenarios--like advanced lookup functionality--that I'd address if I was inventing a Web framework. I've been re-reading the Agile Rails book but couldn't find a discussion of search functionality ("search" also isn't listed in the index). I'm sure people are building search functionality and I'm just missing something!
on 2006-01-27 17:54
on 2006-01-27 18:00
Mike wrote: > Hello, > > How do you handle advanced searches in Rails, i.e., anything more than > one field? > find_all_by_fielda_and_fieldb(vala,valb) will do it. If it's more complex, you can use: find(:all, :conditions => ['foo=? and bar!=?', [vala, valb]])
on 2006-01-27 18:30
Hey Alex, Thanks. I may be making this more complicated than it needs to be in Rails.
on 2006-01-28 00:42
I'm a newbie but I think that is what Ferret is for. On 1/27/06, Mike <firstname.lastname@example.org> wrote: > > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > -- Greg Freemyer The Norcross Group Forensics for the 21st Century