Skip to content

Commit

Permalink
Revert "Merged pull request #40 from gmile/master."
Browse files Browse the repository at this point in the history
This reverts commit 490d6f9, reversing
changes made to dd07005.
  • Loading branch information
tenderlove committed Apr 29, 2011
1 parent 9cd009b commit d09a882
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/arel/predications.rb
Expand Up @@ -42,17 +42,7 @@ def in other
Nodes::Between.new(self, Nodes::And.new([other.begin, other.end])) Nodes::Between.new(self, Nodes::And.new([other.begin, other.end]))
end end
else else
if other.include?(nil) Nodes::In.new self, other
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
end end
end end


Expand Down

2 comments on commit d09a882

@gmile
Copy link

@gmile gmile commented on d09a882 Apr 29, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@tenderlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.