Thanks to Pawel Kondzior, there’s a little bug fix for the condition builder. Previously, making multiple “OR” blocks would make “AND” blocks instead:
Condition.block do |t|
t.or do |u|
u.and "b", 1
u.and "c", 2
end
t.or do |v|
v.and "d", 3
end
end
# => ["(b = ? AND c = ?) AND (d = ?)", 1, 2, 3]
Now, as expected, it produces:
# [...]