OR conditions with multiple different parameters (feature request) #118

Open
gamov opened this Issue Sep 21, 2010 · 0 comments

Comments

Projects
None yet
1 participant

gamov commented Sep 21, 2010

The documentation states:

User.id_or_age_lt_or_username_or_first_name_begins_with(10)
  => "id < 10 OR age < 10 OR username LIKE 'ben%' OR first_name like 'ben%'"

But I believe this is wrong and the result should be:

"id < 10 OR age < 10 OR username LIKE '10%' OR first_name like '10%'"

However, I would love to get the result as it is stated in the doc.
I suppose it would imply a call like this (listing params in the order they are declared in the method name):
User.id_or_age_lt_or_username_or_first_name_begins_with(10,'ben')

That would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment