Permalink
Browse files

Revert "Merged pull request #40 from gmile/master."

This reverts commit 490d6f9, reversing
changes made to dd07005.
  • Loading branch information...
1 parent 9cd009b commit d09a882329e8eeebac89e907289c537077f81d44 @tenderlove tenderlove committed Apr 29, 2011
Showing with 1 addition and 11 deletions.
  1. +1 −11 lib/arel/predications.rb
View
@@ -42,17 +42,7 @@ def in other
Nodes::Between.new(self, Nodes::And.new([other.begin, other.end]))
end
else
- if other.include?(nil)
- if other.size > 1
- set = Nodes::In.new self, other.compact
- null = Nodes::Equality.new self, nil
- Nodes::Or.new set, null
- else
- Nodes::Equality.new self, nil
- end
- else
- Nodes::In.new self, other
- end
+ Nodes::In.new self, other
end
end

2 comments on commit d09a882

Any test failed? Or should I provide tests for this one?

Owner

tenderlove replied Apr 29, 2011

No, I decided to fix this in Rails. ARel does not (and should not) prevent you from creating bad SQL, the layer above ARel (ActiveRecord) is responsible for "doing the right thing".

Please sign in to comment.