#13 ✓resolved
Paul Mason

And or Or options for conditions

Reported by Paul Mason | October 21st, 2008 @ 05:37 PM

Is it be possible to control a search condition by prefixing it's name with and or and or?

That way more complicated searches would be able to run without switching the entire search to be one or the other.

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson October 21st, 2008 @ 06:23 PM

    • State changed from “new” to “resolved”

    Technically you could, the problem is that the order that the conditions are called is now relevant, since you can't put certain conditions in nested parenthesis. Params is just a hash, and a hash does not preserve the order. Same with passing a hash of conditions.

    Searchgasm was never meant to replace complicated searching or SQL. It was more or less created to help perform simple search forms and add extra functionality to ActiveRecord. Making search forms extremely easy to set up. I have always looked at it from that angle and less of a tool to use to help searching in the console, if that makes sense. If you need to do complex searching a combination of scopes and searchgasm should do the trick.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket

Pages