提交 b9eec677 编写于 作者: A Aaron Patterson

avoid direct use of arel constants

上级 af3e3935
......@@ -22,8 +22,10 @@ def merge(r)
merged_wheres = @where_values
r.where_values.each do |w|
if w.is_a?(Arel::Predicates::Equality)
merged_wheres = merged_wheres.reject {|p| p.is_a?(Arel::Predicates::Equality) && p.operand1.name == w.operand1.name }
if w.respond_to?(:operator) && w.operator == :==
merged_wheres = merged_wheres.reject { |p|
p.respond_to?(:operator) && p.operator == :== && p.operand1.name == w.operand1.name
}
end
merged_wheres += [w]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册