just mutate the ast, fewer lasgns

This commit is contained in:
Aaron Patterson
2010-12-10 14:02:14 -08:00
committed by Vijay Dev
parent e9732c75a8
commit cea73f82ad

View File

@@ -225,14 +225,13 @@ module ActiveRecord
test = eqls.inject(eqls.shift) do |memo, expr|
memo.or(expr)
end
arel = arel.where(test)
arel.where(test)
end
(wheres - equalities).each do |where|
where = Arel.sql(where) if String === where
arel = arel.where(Arel::Nodes::Grouping.new(where))
arel.where(Arel::Nodes::Grouping.new(where))
end
arel
end
def build_where(opts, other = [])