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

Why is Arel::Nodes::Or.neq different from Arel::Nodes::And.new? #533

Closed
jonas-schulze opened this issue Apr 16, 2018 · 2 comments
Closed

Comments

@jonas-schulze
Copy link

jonas-schulze commented Apr 16, 2018

The following code is totally fine:

users = Arel::Table.new(:users)
sub_clauses = [
  users[:name].eq 'Chuck Norris',
  users[:age].eq 42,
]
Arel::Nodes::And.new sub_clauses

Substitute And for Or and it no longer is. To get a proper Or you have to sub_clauses.reduce(:or). Why do they behave differently?

@rafaelfranca
Copy link
Member

Not sure. Please do investigate. Maybe there is no reason and we just to implement.

@matthewd
Copy link
Member

Per #523, Arel development is moving to rails/rails.

If this issue is still relevant, please consider reopening it over there. (Note that the Rails repository does not accept feature request issues, and requires reproduction steps that rely on Active Record's documented API.)

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

No branches or pull requests

3 participants