diff options
Diffstat (limited to 'lib/arel/engines/sql/predicates.rb')
-rw-r--r-- | lib/arel/engines/sql/predicates.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/arel/engines/sql/predicates.rb b/lib/arel/engines/sql/predicates.rb index 29bc74c605..b459168620 100644 --- a/lib/arel/engines/sql/predicates.rb +++ b/lib/arel/engines/sql/predicates.rb @@ -30,11 +30,11 @@ module Arel def predicate_sql; "AND" end end - class GroupedPredicate < Grouped + class GroupedPredicate < Polyadic def to_sql(formatter = nil) "(" + - operands2.inject([]) { |predicates, operand| - predicates << operator.new(operand1, operand).to_sql + additional_operands.inject([]) { |predicates, operand| + predicates << operator.new(operand1, operand).to_sql(formatter) }.join(" #{predicate_sql} ") + ")" end |