fix hash clause handling

This commit is contained in:
Loic Nageleisen 2017-03-01 16:48:09 +01:00
parent d538a9b584
commit 8a9b5804fc
2 changed files with 2 additions and 0 deletions

View file

@ -296,6 +296,7 @@ module Rebel::SQL
def and_clause(*clause)
clause.map do |e|
case e
when Hash then and_clause(*e.to_a)
when Array then clause_term(e[0], e[1])
when Raw then e.wants_parens? && clause.count > 1 ? "(#{e})" : e
when String then e