aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-03-23 13:48:35 -0700
committerCarl Lerche <carllerche@mac.com>2010-03-23 13:48:35 -0700
commit8991daa5e3077e31f90500fd52d77b69d979cc97 (patch)
tree80a2e67be833e6c75ac5554942f5ec9d7d71da55 /lib/arel/engines
parent09765829d38e78c0d260aac805c9f405a1523d56 (diff)
downloadrails-8991daa5e3077e31f90500fd52d77b69d979cc97.tar.gz
rails-8991daa5e3077e31f90500fd52d77b69d979cc97.tar.bz2
rails-8991daa5e3077e31f90500fd52d77b69d979cc97.zip
Restrictions should be able to contain multiple predicates.
Diffstat (limited to 'lib/arel/engines')
-rw-r--r--lib/arel/engines/memory/relations/operations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/engines/memory/relations/operations.rb b/lib/arel/engines/memory/relations/operations.rb
index 5d7b7670b6..55b4dcb677 100644
--- a/lib/arel/engines/memory/relations/operations.rb
+++ b/lib/arel/engines/memory/relations/operations.rb
@@ -1,7 +1,7 @@
module Arel
class Where < Compound
def eval
- unoperated_rows.select { |row| predicate.eval(row) }
+ unoperated_rows.select { |row| predicates.all? { |p| p.eval(row) } }
end
end