Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OR conditions with Search class #31

Open
davidsevcik opened this issue Sep 16, 2009 · 4 comments
Open

OR conditions with Search class #31

davidsevcik opened this issue Sep 16, 2009 · 4 comments

Comments

@davidsevcik
Copy link

Could be possible to add OR support even to Search class. I would like do this
Book.search(:title_or_description_like => 'ruby')
or in chain
s = Book.search
s.title_or_description_like('ruby')

Now it produce only
s.conditions => {:title_or_description_like => false}

Thanks for wonderful work.

@jtoy
Copy link

jtoy commented Sep 30, 2009

is this going to be worked on, I just ran into this. A large part of using search logic is the search method, but you currently cant use or statements like: User.search(:gpa_lte_or_null => 4) It just ignores all the conditions.

@theworkinggroup
Copy link

noticed the same issue. a bit annoying.

@xijo
Copy link

xijo commented Nov 3, 2009

would be very helpful if the search object supports OR chaining as well.

@kylewelsby
Copy link

I have an issues somewhat like this,
Trying to search an association if it exists.

Place.{:title, :brand_id}
Brand.{:title}

Place.title_or_brand_title_like_any(q)

only searches places that are associated with a brand, fails to return places without a association.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants